<template>
  <section>
    <!--工具条-->
    <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
      <el-form :inline="true" :model="filters">
        <!-- <el-form-item>
          <el-input v-model="filters.id" placeholder="ID"></el-input>
        </el-form-item> -->
        <el-row :gutter="40">
          <el-col :xs="24" :sm="12" :md="6" :lg="6" style="margin-bottom:5px;">
            <el-input size="small" style="width:100%;" v-model.trim="filters.productCname" placeholder="产品中文名"></el-input>
          </el-col>
          <el-col :xs="24" :sm="12" :md="6" :lg="6" style="margin-bottom:5px;">
            <el-tooltip class="item" effect="dark" content="有效起期" placement="top">
              <el-date-picker size="small" style="width:100%;" type="date" placeholder="选择有效起日期" v-model="filters.startDate"></el-date-picker>
            </el-tooltip>
          </el-col>
          <el-col :xs="24" :sm="12" :md="6" :lg="6" style="margin-bottom:5px;">
            <el-tooltip class="item" effect="dark" content="有效止期" placement="top">
              <el-date-picker size="small" style="width:100%;" type="date" placeholder="选择有效止日期" v-model="filters.endDate"></el-date-picker>
            </el-tooltip>
          </el-col>
          <el-col :xs="24" :sm="12" :md="6" :lg="6" style="margin-bottom:5px;">
            <el-select size="small" clearable style="width:100%;" v-model="filters.status" placeholder="状态">
              <!-- <el-option label="全部状态"  value="-1"  ></el-option> -->
              <el-option label="上架" value="1"></el-option>
              <el-option label="下架" value="0"></el-option>
              <el-option label="添加待审批" value="2"></el-option>
              <el-option label="修改待审批" value="3"></el-option>
            </el-select>
          </el-col>
        </el-row>
        <el-row :gutter="40">
          <el-col :xs="24" :sm="12" :md="6" :lg="6" style="margin-bottom:5px;">
            <el-select size="small" clearable style="width:100%;" v-model="filters.riskCode" placeholder="险种">
              <!-- <el-option label="全部险种"  value="-1"  ></el-option> -->
              <el-option v-for="(item,index) in riskCodes" :key="index" :label="item.codeType1" :value="item.codeEname1"></el-option>
            </el-select>
          </el-col>
          <el-form-item style="float:right;margin-right:20px;">
            <el-button v-show="productExport" size="small" type="primary" icon="upload2" @click="exportExcels">导出</el-button>
          </el-form-item>
          <el-form-item style="float:right;">
            <el-button v-show="productAdd" size="small" type="primary" icon="plus" :disabled="configUser()" @click="handleAdd">新增</el-button>
          </el-form-item>
          <el-form-item style="float:right;">
            <el-button v-show="productQuery" size="small" icon="search" type="primary" v-on:click="getProducts(true)">查询</el-button>
          </el-form-item>
        </el-row>
      </el-form>
    </el-col>

    <!--列表-->
    <el-table :data="products" stripe border :height="winHeight-239" highlight-current-row v-loading="listLoading" @selection-change="selsChange" style="width: 100%;">
      <el-table-column type="selection" width="55">
      </el-table-column>
      <el-table-column prop="id" label="ID" width="80" sortable>
      </el-table-column>
      <el-table-column prop="productCname" label="产品中文名" width="180" show-overflow-tooltip>
      </el-table-column>
      <el-table-column prop="productEname" label="产品英文名" width="180" show-overflow-tooltip>
      </el-table-column>
      <el-table-column prop="productCompany" label="产品所属公司" width="180" :formatter="formatPC" show-overflow-tooltip>
      </el-table-column>
      <el-table-column prop="riskCode" label="险种" width="100" :formatter="formatRisk" sortable>
      </el-table-column>
      <!-- <el-table-column prop="hotFlag" label="是否热销" width="120" :formatter="formathotFlag" sortable>
      </el-table-column> -->
      <el-table-column prop="hotFlag" label="状态" align="center" width="120" :formatter="formatStatus" sortable>
      </el-table-column>
      <el-table-column prop="startDate" label="有效起期" width="180" sortable>
      </el-table-column>
      <el-table-column prop="endDate" label="有效止期" min-width="180" sortable>
      </el-table-column>
      <!-- <el-table-column prop="deadLine" label="保障期限" min-width="120" sortable>
      </el-table-column> -->
      <el-table-column prop="maxAge" label="最大年龄" min-width="120" sortable>
      </el-table-column>
      <el-table-column prop="minAge" label="最小年龄" min-width="120" sortable>
      </el-table-column>
      <el-table-column prop="quantity" label="销量" min-width="120" sortable>
      </el-table-column>
      <el-table-column prop="priPrice" label="原价" min-width="120" sortable>
      </el-table-column>
      <el-table-column prop="discountPrice" label="折扣价" min-width="120" sortable>
      </el-table-column>
      <el-table-column prop="minPrice" label="最低价格" min-width="120" sortable>
      </el-table-column>
      <el-table-column label="操作" fixed='right' width="210">
        <template scope="scope">
          <el-button v-show="productDetail" size="small" @click="handleDetail(scope.$index, scope.row)">详情</el-button>
          <el-button v-show="productPlan" size="small" type="primary" :disabled="configUser()" @click="handlePlan(scope.$index, scope.row)">计划</el-button>
          <el-button type="warning" size="small" :disabled="configUser()" v-show="IsEdit(scope.$index, scope.row)" @click="handleEdit(scope.$index, scope.row)">修改</el-button>
          <el-button type="danger" size="small" :disabled="ApproveUser(scope.$index, scope.row)" v-show="IsApprove(scope.$index, scope.row)" @click="handleEdit(scope.$index, scope.row)">审批</el-button>
          <!-- <el-button type="danger" size="small" v-show="buttonShow(scope.$index, scope.row)"  @click="handleDel(scope.$index, scope.row)">失效</el-button>
          <el-button type="primary" size="small" v-show="buttonShows(scope.$index, scope.row)"  @click="handleRecover(scope.$index, scope.row)">恢复</el-button> -->
          <!-- <el-button type="danger" size="small" @click="handleConfig(scope.$index, scope.row)">配置</el-button> -->
        </template>
      </el-table-column>
    </el-table>
    <!--工具条-->
    <el-col :span="24" class="toolbar">
      <!--  <el-button type="danger" @click="batchRemove" :disabled="this.sels.length===0">批量失效</el-button> -->
      <el-button type="warning" size="small" :disabled="this.sels.length===0" @click="exclusiveClick">设置专属</el-button>
      <el-pagination style="float:right" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page" :page-sizes="[10, 20, 40, 80]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total">
      </el-pagination>
    </el-col>

    <!--修改界面-->
    <el-dialog :title="Atitle" size="large" v-model="editFormVisible" :close-on-click-modal="false">
      <el-form :model="editForm" label-width="125px" :rules="editFormRules" ref="editForm">
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="产品中文名:" prop="productCname">
              <el-input v-model="editForm.productCname" :disabled="EditStatus" :style="highlight('productCname')" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="产品英文名:" prop="aname">
              <el-input v-model="editForm.productEname" :disabled="EditStatus" :style="highlight('productEname')" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="产品状态:" prop="status">
              <el-select v-model="editForm.status" class="otherWidth" :disabled="EditStatus" :style="highlight('status')" placeholder="状态">
                <el-option label="上架" value="1"></el-option>
                <el-option label="下架" value="0"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="提前投保天数:" prop="advanceDay">
              <el-input v-model="editForm.advanceDay" :disabled="EditStatus" :style="highlight('advanceDay')" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="产品大类:" prop="productType">
              <el-input v-model="editForm.productType" :disabled="EditStatus" :style="highlight('productType')" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="序号:" prop="serialNo">
              <el-input v-model="editForm.serialNo" :disabled="EditStatus" :style="highlight('serialNo')" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="险种:" prop="riskCode">
              <el-select v-model="editForm.riskCode" class="otherWidth" :disabled="EditStatus" :style="highlight('riskCode')" placeholder="险种">
                <!-- <el-option label="全部险种"  value=""  ></el-option> -->
                <el-option v-for="(item,index) in riskCodes" :key="index" :label="item.codeType1" :value="item.codeEname1"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="险种打印名称:" prop="riskPrintName">
              <el-input v-model="editForm.riskPrintName" :disabled="EditStatus" :style="highlight('riskPrintName')" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="销量:" prop="quantity">
              <el-input v-model="editForm.quantity" :disabled="EditStatus" :style="highlight('quantity')" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="原价:" prop="name">
              <el-input v-model="editForm.priPrice" :disabled="EditStatus" :style="highlight('priPrice')" auto-complete="off" placeholder="(单位/元)"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="折扣价:" prop="name">
              <el-input v-model="editForm.discountPrice" :disabled="EditStatus" :style="highlight('discountPrice')" auto-complete="off" placeholder="(单位/元)"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="最低价格:" prop="minPrice" :rules="[
      { required: true, message: '请输入最低价格'}]">
              <el-input v-model="editForm.minPrice" :disabled="EditStatus" :style="highlight('minPrice')" auto-complete="off" placeholder="(单位/元)"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="最大年龄:" prop="maxAge">
              <el-input v-model="editForm.maxAge" :disabled="EditStatus" :style="highlight('maxAge')" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="最小年龄:" prop="minAge">
              <el-input v-model="editForm.minAge" :disabled="EditStatus" :style="highlight('minAge')" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="最小乘保月份:" prop="minMonth">
              <el-input v-model="editForm.minMonth" auto-complete="off" placeholder="请输入最小乘保月份" :disabled="EditStatus"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="最大期限:" prop="maxDeadLine">
              <el-input v-model="editForm.maxDeadLine" :disabled="EditStatus" :style="highlight('maxDeadLine')" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>

        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="最小期限:" prop="minDeadLine">
              <el-input v-model="editForm.minDeadLine" :disabled="EditStatus" :style="highlight('minDeadLine')" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="有效起期:" prop="startDate" :rules="[
      { required: true, message: '请选择有效起期'}]">
              <el-date-picker type="date" placeholder="选择日期" class="otherWidth" v-model="editForm.startDate" :disabled="EditStatus" :style="highlight('startDate')"></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="有效止期:" prop="endDate" :rules="[
      { required: true, message: '请选择有效止期'}]">
              <el-date-picker type="date" placeholder="选择日期" class="otherWidth" v-model="editForm.endDate" :disabled="EditStatus" :style="highlight('endDate')"></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="是否显示:" prop="name">
              <el-select v-model="editForm.isShow" class="otherWidth" :disabled="EditStatus" :style="highlight('isShow')" placeholder="是否显示">
                <el-option label="是" value="1"></el-option>
                <el-option label="否" value="0"></el-option>
              </el-select>
            </el-form-item>
          </el-col>

        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="是否专属:" prop="isExclusive">
              <el-select v-model="editForm.isExclusive" class="otherWidth" :disabled="EditStatus" placeholder="是否专属">
                <el-option label="是" value="1"></el-option>
                <el-option label="否" value="0"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="问卷名:">
              <el-input :disabled="EditStatus" v-model="editForm.showEle.queId" auto-complete="off" placeholder="请输入问卷名"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="上传文件:">
              <el-input v-model="editForm.showEle.uploadId" :disabled="EditStatus" auto-complete="off" placeholder="请输入上传文件"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="最小投保人数:">
              <el-input v-model="editForm.showEle.minInsure" :disabled="EditStatus" auto-complete="off" placeholder="请输入最小投保人数"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label=" 自定义输入项:">
              <el-input v-model="editForm.showEle.inputConfigId" :disabled="EditStatus" auto-complete="off" placeholder="请输入自定义输入项"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="是否热销:">
              <el-select v-model="editForm.isHot" class="otherWidth" placeholder="是否热销">
                <el-option label="是" value="1"></el-option>
                <el-option label="否" value="0"></el-option>
              </el-select>
            </el-form-item>
          </el-col>

          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="产品所属公司:" prop="productCompany">
              <el-select v-model="editForm.productCompany" class="otherWidth" :style="highlight('productCompany')" placeholder="产品所属公司">
                <el-option v-for="(item,index) in productCompanys" :key="index" :label="item.codeCname" :value="item.id"></el-option>
              </el-select>
            </el-form-item>
          </el-col>

        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="定额产品:" prop="name">
              <el-radio-group v-model="editForm.isQuota" :disabled="EditStatus">
                <el-radio :disabled="allIs" label="1">是</el-radio>
                <el-radio :disabled="allIs" label="0">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="安行天下:" prop="name">
              <el-radio-group v-model="editForm.showEle.isAxtx" :disabled="EditStatus" @change="AllFalse(editForm.showEle.isAxtx,'edit')">
                <el-radio :label="true">是</el-radio>
                <el-radio :label="false">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="多个被保险人:" prop="name">
              <el-radio-group v-model="editForm.showEle.moreInsured" :disabled="EditStatus">
                <el-radio :disabled="allIs" :label="true">是</el-radio>
                <el-radio :disabled="allIs" :label="false">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="职业类别:" prop="name">
              <el-radio-group v-model="editForm.showEle.occupation" :disabled="EditStatus">
                <el-radio :disabled="allIs" :label="true">是</el-radio>
                <el-radio :disabled="allIs" :label="false">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="补充信息录入:" prop="name">
              <el-radio-group v-model="editForm.showEle.isShowOther" @change="otherCilck" :disabled="EditStatus">
                <el-radio :disabled="allIs" :label="true">是</el-radio>
                <el-radio :disabled="allIs" :label="false">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>

          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="车架:" prop="vinno">
              <el-radio-group v-model="editForm.showEle.vinno" :disabled="EditStatus">
                <el-radio :disabled="allIs" :label="true">是</el-radio>
                <el-radio :disabled="allIs" :label="false">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="是否显示车牌:" prop="name">
              <el-radio-group v-model="editForm.showEle.licenseno" :disabled="EditStatus">
                <el-radio :disabled="allIs" :label="true">是</el-radio>
                <el-radio :disabled="allIs" :label="false">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="限制车牌:" prop="name">
              <el-radio-group v-model="editForm.showEle.limitLicenseno" @change="LicensenoCilck(showLicenseno)" :disabled="EditStatus">
                <el-radio :disabled="allIs" :label="true">是</el-radio>
                <el-radio :disabled="allIs" :label="false">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>

        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="显示年龄:" prop="name">
              <el-radio-group v-model="editForm.baseStatus" :disabled="EditStatus">
                <el-radio :disabled="allIs" label="1">是</el-radio>
                <el-radio :disabled="allIs" label="0">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="同被保人:" prop="sameInsure">
              <el-radio-group v-model="editForm.showEle.sameInsure" :disabled="EditStatus">
                <el-radio :disabled="allIs" :label="true">是</el-radio>
                <el-radio :disabled="allIs" :label="false">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <!-- </el-row> -->
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="是否显示企业选项:" prop="name">
              <el-radio-group v-model="editForm.showEle.isShowEnt" :disabled="EditStatus">
                <el-radio :disabled="allIs" :label="true">是</el-radio>
                <el-radio :disabled="allIs" :label="false">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="主被保险人18岁校验:" prop="name">
              <el-radio-group v-model="editForm.showEle.mainInsureVal" :disabled="EditStatus">
                <el-radio :disabled="allIs" :label="true">是</el-radio>
                <el-radio :disabled="allIs" :label="false">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="主被保人职业选择:" prop="name">
              <el-radio-group v-model="editForm.showEle.occupationLimit" :disabled="EditStatus">
                <el-radio :disabled="allIs" :label="true">是</el-radio>
                <el-radio :disabled="allIs" :label="false">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="不显示其他(关系):" prop="name">
              <el-radio-group v-model="editForm.showEle.isRelOther" :disabled="EditStatus">
                <el-radio :disabled="allIs" :label="true">是</el-radio>
                <el-radio :disabled="allIs" :label="false">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
        </el-row>
        <el-card class="box-card" v-show="showLicenseno">
          <el-row>
            <el-col :xs="20" :sm="12" :md="12" :lg="8">
              <el-form-item label="管理车牌:">
                <el-button size="small" type="primary" @click="manageLicenseno(true)">管理车牌</el-button>
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>
        <el-card class="box-card" v-show="showOther">
          <el-row>
            <el-col :xs="20" :sm="12" :md="6" :lg="6">
              <el-form-item label="境外旅行国家选择:" prop="name">
                <el-radio-group v-model="editForm.showEle.abroadDestination" :disabled="EditStatus">
                  <el-radio :label="true">是</el-radio>
                  <el-radio :label="false">否</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
            <el-col :xs="20" :sm="12" :md="6" :lg="6">
              <el-form-item label="房屋所在地:" prop="name">
                <el-radio-group v-model="editForm.showEle.locationHouse" :disabled="EditStatus">
                  <el-radio :label="true">是</el-radio>
                  <el-radio :label="false">否</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
            <el-col :xs="20" :sm="12" :md="6" :lg="6">
              <el-form-item label="详细地址:" prop="name">
                <el-radio-group v-model="editForm.showEle.address" :disabled="EditStatus">
                  <el-radio :label="true">是</el-radio>
                  <el-radio :label="false">否</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
            <el-col :xs="20" :sm="12" :md="6" :lg="6">
              <el-form-item label="房屋类型:" prop="name">
                <el-radio-group v-model="editForm.showEle.houseType" :disabled="EditStatus">
                  <el-radio :label="true">是</el-radio>
                  <el-radio :label="false">否</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :xs="20" :sm="12" :md="6" :lg="6">
              <el-form-item label="境内目的地:" prop="name">
                <el-radio-group v-model="editForm.showEle.destination" :disabled="EditStatus">
                  <el-radio :label="true">是</el-radio>
                  <el-radio :label="false">否</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
            <el-col :xs="20" :sm="12" :md="6" :lg="6">

            </el-col>
            <el-col :xs="20" :sm="12" :md="6" :lg="6">

            </el-col>
            <el-col :xs="20" :sm="12" :md="6" :lg="6">

            </el-col>
          </el-row>
        </el-card>
        <el-form-item label="积分比例配置:" prop="name">
        </el-form-item>
        <el-table border :data="IntegralAllotDatas" style="margin-bottom:30px;margin-top:20px;">
          <el-table-column label="有效" align="center">
            <template scope="scope">
              <div :style="tableStyle('status',scope.$index)">
                <el-checkbox :value="IsValid(scope.$index, scope.row)" :disabled="EditStatus" @change="handleValid(scope.$index, scope.row, $event)"></el-checkbox>
              </div>
            </template>
          </el-table-column>
          <el-table-column prop="branchName" align="center" label="机构">
          </el-table-column>
          <el-table-column align="center" label="比例">
            <template scope="scope">
              <!-- <div :style="tableStyle('rate',scope.$index)"> -->
              <el-tooltip class="item" effect="dark" content="请输入0-1" placement="top">
                <el-input :style="tableStyle('rate',scope.$index)" style="width:50%;" v-model="scope.row.rate" size="small" @blur="inputblur(scope.row.rate)" :disabled="EditStatus" auto-complete="off"></el-input>
              </el-tooltip>
              <span v-show="helpValidate(scope.row.rate,scope.$index,EditStatus)" class="help-block">{{helptext(scope.row.rate)}}</span>
              <!-- </div> -->
            </template>
          </el-table-column>
        </el-table>
        <el-row>
          <el-col :xs="24" :sm="12" :md="12" :lg="6">
            <el-form-item label="列表图标:" prop="name">
              <el-upload class="upload-demo" :action="picURL" :on-success="editSuccessImgUrl" :on-remove="editRemoveImgUrl" :file-list="fileList2ImgUrl" :data="{parampath:editForm.riskCode}" :multiple="true" list-type="picture" :disabled="EditStatus">
                <el-button size="small" :style="highlight('imgUrl')" type="primary">点击上传</el-button>
              </el-upload>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="12" :md="12" :lg="6">
            <el-form-item label="产品缩略图:" prop="name">
              <el-upload class="upload-demo" :action="picURL" :on-success="editSuccessImgThumbnailUrl" :on-remove="editRemoveImgThumbnailUrl" :file-list="fileList2ImgThumbnailUrl" :data="{parampath:editForm.riskCode}" :multiple="true" list-type="picture" :disabled="EditStatus">
                <el-button size="small" :style="highlight('imgThumbnailUrl')" type="primary">点击上传</el-button>
              </el-upload>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="12" :md="12" :lg="6">
            <el-form-item label="产品介绍:" prop="name">
              <el-upload class="upload-demo" :action="picURL" :on-success="editSuccessIntroduceUrl" :on-remove="editRemoveIntroduceUrl" :file-list="fileList2IntroduceUrl" :data="{parampath:editForm.riskCode}" :multiple="true" list-type="picture" :disabled="EditStatus">
                <el-button size="small" :style="highlight('introduceUrl')" type="primary">点击上传</el-button>
              </el-upload>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="12" :md="12" :lg="6">
            <el-form-item label="保障方案:" prop="name">
              <el-upload class="upload-demo" :action="picURL" :on-success="editSuccessSchemeUrl" :on-remove="editRemoveSchemeUrl" :file-list="fileList2SchemeUrl" :data="{parampath:editForm.riskCode}" :multiple="true" list-type="picture" :disabled="EditStatus">
                <el-button size="small" :style="highlight('schemeUrl')" type="primary">点击上传</el-button>
                <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div> -->
              </el-upload>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :xs="24" :sm="12" :md="12" :lg="6">
            <el-form-item label="服务详情:" prop="name">
              <!-- <el-input v-model="editForm.detailUrl"  auto-complete="off"></el-input> -->
              <el-upload class="upload-demo" :action="picURL" :on-success="editSuccessDetailUrl" :on-remove="editRemoveDetailUrl" :file-list="fileList2DetailUrl" :data="{parampath:editForm.riskCode}" :multiple="true" list-type="picture" :disabled="EditStatus">
                <el-button size="small" :style="highlight('detailUrl')" type="primary">点击上传</el-button>
                <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div> -->
              </el-upload>
            </el-form-item>
          </el-col>
        </el-row>
        <el-form-item label="备注:" prop="name">
          <el-input v-model="editForm.remark" :style="highlight('remark')" :disabled="EditStatus" auto-complete="off"></el-input>
        </el-form-item>
        <!-- <el-form-item label="服务详情"  prop="name">
                <el-input v-model="editForm.detailUrl"  auto-complete="off"></el-input>
              </el-form-item> -->
        <el-form-item label="描述:" prop="name">
          <el-input type="textarea" :style="highlight('descrition')" v-model="editForm.descrition" :disabled="EditStatus" auto-complete="off"></el-input>
        </el-form-item>
        <el-form-item label="详细介绍:" prop="name">
          <!--  <el-input type="textarea"   v-model="editForm.detail" auto-complete="off"></el-input> -->
          <div class="kboder" @click="Detail('edit')" style="height:80px;min-width:120px;">
            <div id="editDetail" class="ksboder">
            </div>
          </div>
        </el-form-item>
        <el-form-item label="审批备注" prop="name" v-show="EditStatus">
          <el-input type="textarea" v-model="approveRemark" auto-complete="off"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click.native="editCancel">{{cancel}}</el-button>
        <el-button type="primary" @click.native="editSubmit" :loading="editLoading">{{submit}}</el-button>
      </div>
    </el-dialog>

    <!--新增界面-->
    <el-dialog title="新增" size="large" v-model="addFormVisible" :close-on-click-modal="false">
      <el-form :model="addForm" label-width="120px" :rules="addFormRules" ref="addForm">
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="产品中文名:" prop="productCname">
              <el-input v-model="addForm.productCname" auto-complete="off" placeholder="请输入产品中文名"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="产品英文名:" prop="aname">
              <el-input v-model="addForm.productEname" auto-complete="off" placeholder="请输入产品英文名"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="产品状态:" prop="status">
              <el-select v-model="addForm.status" class="otherWidth" placeholder="状态">
                <el-option label="上架" value="1"></el-option>
                <el-option label="下架" value="0"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="提前投保天数:" prop="advanceDay">
              <el-input v-model="addForm.advanceDay" auto-complete="off" placeholder="请输入提前投保天数"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="产品大类:" prop="productType">
              <el-input v-model="addForm.productType" @blur="riskName" auto-complete="off" placeholder="请输入产品大类"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="序号:" prop="serialNo">
              <el-input v-model="addForm.serialNo" auto-complete="off" placeholder="请输入序号"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="险种:" prop="riskCode">
              <el-select v-model="addForm.riskCode" class="otherWidth" placeholder="险种">
                <el-option v-for="(item,index) in riskCodes" :key="index" :label="item.codeType1" :value="item.codeEname1"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="险种打印名称:" prop="riskPrintName">
              <el-input v-model="addForm.riskPrintName" auto-complete="off" placeholder="请输入险种打印名称"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="原价:" prop="name">
              <el-input v-model="addForm.priPrice" auto-complete="off" placeholder="请输入原价(元)">
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="折扣价:" prop="name">
              <el-input v-model="addForm.discountPrice" auto-complete="off" placeholder="请输入折扣价(单位/元)"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="最低价格:" prop="minPrice">
              <el-input v-model="addForm.minPrice" auto-complete="off" placeholder="请输入最低价格(单位/元)"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="销量:" prop="quantity">
              <el-input v-model="addForm.quantity" auto-complete="off" placeholder="请输入销量"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="最大年龄:" prop="maxAge">
              <el-input v-model="addForm.maxAge" auto-complete="off" placeholder="请输入最大年龄"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="最小年龄:" prop="minAge">
              <el-input v-model="addForm.minAge" auto-complete="off" placeholder="请输入最小年龄"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="最小乘保月份:" prop="minMonth">
              <el-input v-model="addForm.minMonth" auto-complete="off" placeholder="请输入最小乘保月份"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="最大期限:" prop="maxDeadLine">
              <el-input v-model="addForm.maxDeadLine" auto-complete="off" placeholder="请输入最大期限"></el-input>
            </el-form-item>
          </el-col>

        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="最小期限:" prop="minDeadLine">
              <el-input v-model="addForm.minDeadLine" auto-complete="off" placeholder="请输入最小期限"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="有效起期:" prop="startDate">
              <el-date-picker type="date" placeholder="选择日期" class="otherWidth" v-model="addForm.startDate"></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="有效止期:" prop="endDate">
              <el-date-picker type="date" placeholder="选择日期" class="otherWidth" v-model="addForm.endDate"></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="是否显示:" prop="name">
              <el-select v-model="addForm.isShow" class="otherWidth" placeholder="是否显示">
                <el-option label="是" value="1"></el-option>
                <el-option label="否" value="0"></el-option>
              </el-select>
            </el-form-item>
          </el-col>

        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="是否专属:" prop="isExclusive">
              <el-select v-model="addForm.isExclusive" class="otherWidth" placeholder="是否专属">
                <el-option label="是" value="1"></el-option>
                <el-option label="否" value="0"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="问卷名:">
              <el-input v-model="addForm.showEle.queId" auto-complete="off" placeholder="请输入问卷名"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="上传文件:">
              <el-input v-model="addForm.showEle.uploadId" auto-complete="off" placeholder="请输入上传文件"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="最小投保人数:">
              <el-input v-model="addForm.showEle.minInsure" auto-complete="off" placeholder="请输入最小投保人数"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label=" 自定义输入项:">
              <el-input v-model="addForm.showEle.inputConfigId" :disabled="EditStatus" auto-complete="off" placeholder="请输入自定义输入项"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="是否热销:">
              <el-select v-model="addForm.isHot" class="otherWidth" placeholder="是否热销">
                <el-option label="是" value="1"></el-option>
                <el-option label="否" value="0"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="产品所属公司:" prop="productCompany">
              <el-select v-model="addForm.productCompany" class="otherWidth" placeholder="产品所属公司">
                <el-option v-for="(item,index) in productCompanys" :key="index" :label="item.codeCname" :value="item.id"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="定额产品:" prop="name">
              <el-radio-group v-model="addForm.isQuota">
                <el-radio :disabled="allIs" label="1">是</el-radio>
                <el-radio :disabled="allIs" label="0">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="安行天下:" prop="name">
              <el-radio-group v-model="addForm.showEle.isAxtx" @change="AllFalse(addForm.showEle.isAxtx,'add')">
                <el-radio :label="true">是</el-radio>
                <el-radio :label="false">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="多个被保险人:" prop="name">
              <el-radio-group v-model="addForm.showEle.moreInsured">
                <el-radio :disabled="allIs" :label="true">是</el-radio>
                <el-radio :disabled="allIs" :label="false">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="职业类别:" prop="name">
              <el-radio-group v-model="addForm.showEle.occupation">
                <el-radio :disabled="allIs" :label="true">是</el-radio>
                <el-radio :disabled="allIs" :label="false">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="补充信息录入:" prop="name">
              <el-radio-group v-model="addForm.showEle.isShowOther" @change="otherCilck">
                <el-radio :disabled="allIs" :label="true">是</el-radio>
                <el-radio :disabled="allIs" :label="false">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="车架:" prop="vinno">
              <el-radio-group v-model="addForm.showEle.vinno">
                <el-radio :disabled="allIs" :label="true">是</el-radio>
                <el-radio :disabled="allIs" :label="false">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="是否显示车牌:" prop="name">
              <el-radio-group v-model="addForm.showEle.licenseno">
                <el-radio :disabled="allIs" :label="true">是</el-radio>
                <el-radio :disabled="allIs" :label="false">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="限制车牌:" prop="name">
              <el-radio-group v-model="addForm.showEle.limitLicenseno" @change="LicensenoCilck(showLicenseno)">
                <el-radio :disabled="allIs" :label="true">是</el-radio>
                <el-radio :disabled="allIs" :label="false">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="显示年龄:" prop="name">
              <el-radio-group v-model="addForm.baseStatus">
                <el-radio :disabled="allIs" label="1">是</el-radio>
                <el-radio :disabled="allIs" label="0">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="同被保人:" prop="name">
              <el-radio-group v-model="addForm.showEle.sameInsure">
                <el-radio :disabled="allIs" :label="true">是</el-radio>
                <el-radio :disabled="allIs" :label="false">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="是否显示企业选项:">
              <el-radio-group v-model="addForm.showEle.isShowEnt">
                <el-radio :disabled="allIs" :label="true">是</el-radio>
                <el-radio :disabled="allIs" :label="false">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="主被保险人18岁校验:" prop="name">
              <el-radio-group v-model="addForm.showEle.mainInsureVal">
                <el-radio :disabled="allIs" :label="true">是</el-radio>
                <el-radio :disabled="allIs" :label="false">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="主被保人职业选择:" prop="name">
              <el-radio-group v-model="addForm.showEle.occupationLimit">
                <el-radio :disabled="allIs" :label="true">是</el-radio>
                <el-radio :disabled="allIs" :label="false">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="不显示其他(关系):" prop="name">
              <el-radio-group v-model="addForm.showEle.isRelOther">
                <el-radio :disabled="allIs" :label="true">是</el-radio>
                <el-radio :disabled="allIs" :label="false">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
        </el-row>
        <el-card class="box-card" v-show="showLicenseno">
          <el-row>
            <el-col :xs="20" :sm="12" :md="12" :lg="8">
              <el-form-item label="管理车牌:">
                <el-button size="small" type="primary" @click="manageLicenseno(false)">管理车牌</el-button>
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>
        <el-card class="box-card" v-show="showOther" style="margin-top:10px;">
          <el-row>
            <el-col :xs="20" :sm="12" :md="6" :lg="6">
              <el-form-item label="境外旅行国家选择:" prop="name">
                <el-radio-group v-model="addForm.showEle.abroadDestination">
                  <el-radio :label="true">是</el-radio>
                  <el-radio :label="false">否</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
            <el-col :xs="20" :sm="12" :md="6" :lg="6">
              <el-form-item label="房屋所在地:" prop="name">
                <el-radio-group v-model="addForm.showEle.locationHouse">
                  <el-radio :label="true">是</el-radio>
                  <el-radio :label="false">否</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
            <el-col :xs="20" :sm="12" :md="6" :lg="6">
              <el-form-item label="详细地址:" prop="name">
                <el-radio-group v-model="addForm.showEle.address">
                  <el-radio :label="true">是</el-radio>
                  <el-radio :label="false">否</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
            <el-col :xs="20" :sm="12" :md="6" :lg="6">
              <el-form-item label="房屋类型:" prop="name">
                <el-radio-group v-model="addForm.showEle.houseType">
                  <el-radio :label="true">是</el-radio>
                  <el-radio :label="false">否</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :xs="20" :sm="12" :md="6" :lg="6">
              <el-form-item label="境内目的地:" prop="name">
                <el-radio-group v-model="addForm.showEle.destination">
                  <el-radio :label="true">是</el-radio>
                  <el-radio :label="false">否</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>
        <el-form-item label="积分比例配置:" prop="name">
        </el-form-item>
        <el-table border :data="IntegralAllotData" @cell-dblclick="addDblclick" style="margin-bottom:30px;margin-top:20px;">
          <el-table-column label="有效" align="center" width="120">
            <template scope="scope">
              <el-checkbox :value="IsValid(scope.$index, scope.row)" @change="handleValid(scope.$index, scope.row, $event)"></el-checkbox>
            </template>
          </el-table-column>
          <el-table-column prop="branchName" align="center" label="机构" min-width="180">
          </el-table-column>
          <el-table-column align="center" label="比例(可双击修改)" min-width="160">
            <template scope="scope">
              <span v-show="Isinput(scope.row.branchCode,InputStatus,false)">{{scope.row.rate}}</span>
              <el-tooltip class="item" effect="dark" v-show="Isinput(scope.row.branchCode,InputStatus,true)" content="请输入0-1" placement="top">
                <el-input v-model="scope.row.rate" @blur="inputblur(scope.row.rate)" style="width:50%;" auto-complete="off"></el-input>
              </el-tooltip>
              <span v-show="helpValidate(scope.row.rate,scope.$index)" class="help-block">{{helptext(scope.row.rate)}}</span>
            </template>
          </el-table-column>
        </el-table>
        <el-row>
          <el-col :xs="24" :sm="12" :md="12" :lg="6">
            <el-form-item label="列表图标:" prop="name">
              <el-upload class="upload-demo" :action="picURL" :on-success="handleSuccessImgUrl" :on-remove="handleRemoveImgUrl" :file-list="fileList1ImgUrl" :data="{parampath:addForm.riskCode}" :multiple="true" list-type="picture" :disabled="confirmationStatus">
                <el-button size="small" @click="confirmationRiskCode(addForm.riskCode)" type="primary">点击上传</el-button>

              </el-upload>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="12" :md="12" :lg="6">
            <el-form-item label="产品缩略图:" prop="name">
              <el-upload class="upload-demo" :action="picURL" :on-success="handleSuccessImgThumbnailUrl" :on-remove="handleRemoveImgThumbnailUrl" :file-list="fileList1ImgThumbnailUrl" :data="{parampath:addForm.riskCode}" :multiple="true" list-type="picture" :disabled="confirmationStatus">
                <el-button size="small" @click="confirmationRiskCode(addForm.riskCode)" type="primary">点击上传</el-button>
              </el-upload>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="12" :md="12" :lg="6">
            <el-form-item label="产品介绍:" prop="name">
              <el-upload class="upload-demo" :action="picURL" :on-success="handleSuccessIntroduceUrl" :on-remove="handleRemoveIntroduceUrl" :file-list="fileList1IntroduceUrl" :data="{parampath:addForm.riskCode}" :multiple="true" list-type="picture" :disabled="confirmationStatus">
                <el-button size="small" @click="confirmationRiskCode(addForm.riskCode)" type="primary">点击上传</el-button>

              </el-upload>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="12" :md="12" :lg="6">
            <el-form-item label="保障方案:" prop="name">
              <el-upload class="upload-demo" :action="picURL" :on-success="handleSuccessSchemeUrl" :on-remove="handleRemoveSchemeUrl" :file-list="fileList1SchemeUrl" :data="{parampath:addForm.riskCode}" :multiple="true" list-type="picture" :disabled="confirmationStatus">
                <el-button size="small" @click="confirmationRiskCode(addForm.riskCode)" type="primary">点击上传</el-button>

              </el-upload>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :xs="24" :sm="12" :md="12" :lg="6">
            <el-form-item label="服务详情:" prop="name">
              <el-upload class="upload-demo" :action="picURL" :on-success="handleSuccessDetailUrl" :on-remove="handleRemoveDetailUrl" :file-list="fileList1DetailUrl" :data="{parampath:addForm.riskCode}" :multiple="true" list-type="picture" :disabled="confirmationStatus">
                <el-button size="small" @click="confirmationRiskCode(addForm.riskCode)" type="primary">点击上传</el-button>
              </el-upload>
            </el-form-item>
          </el-col>
        </el-row>
        <el-form-item label="备注:" prop="name">
          <el-input v-model="addForm.remark" auto-complete="off"></el-input>
        </el-form-item>

        <el-form-item label="描述:" prop="name">
          <el-input type="textarea" v-model="addForm.descrition" auto-complete="off"></el-input>
        </el-form-item>
        <el-form-item label="详细介绍:" prop="name">

          <div class="kboder" @click="Detail('add')" style="height:80px;min-width:120px;">
            <div id="addDetail" class="ksboder">
            </div>
          </div>

        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click.native="addFormVisible = false">取消</el-button>
        <el-button type="primary" @click.native="addSubmit" :loading="addLoading">提交</el-button>
      </div>
    </el-dialog>

    <!--详情界面-->
    <el-dialog title="详情" size="large" v-model="detailFormVisible" :close-on-click-modal="false">
      <el-form :model="detailForm" label-width="120px" ref="detailForm">
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="ID:" prop="productCname">
              <el-input v-model="detailForm.id" :readonly="true" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="产品中文名:" prop="productCname">
              <el-input v-model="detailForm.productCname" :readonly="true" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="产品英文名:" prop="productCname">
              <el-input v-model="detailForm.productEname" :readonly="true" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="提前投保天数:" prop="productCname">
              <el-input v-model="detailForm.advanceDay" :readonly="true" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="产品状态:" prop="productCname">
              <el-input v-model="detailForm.status" :readonly="true" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="产品大类:" prop="productCname">
              <el-input v-model="detailForm.productType" :readonly="true" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="序号:" prop="productCname">
              <el-input v-model="detailForm.serialNo" :readonly="true" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="险种:" prop="productCname">
              <el-input v-model="detailForm.riskCode" :readonly="true" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="是否显示:" prop="productCname">
              <el-input v-model="detailForm.isShow" :readonly="true" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="销量:" prop="productCname">
              <el-input v-model="detailForm.quantity" :readonly="true" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="原价:" prop="productCname">
              <el-input v-model="detailForm.priPrice" :readonly="true" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="折扣价:" prop="productCname">
              <el-input v-model="detailForm.discountPrice" :readonly="true" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="最低价格:" prop="productCname">
              <el-input v-model="detailForm.minPrice" :readonly="true" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="最大年龄:" prop="productCname">
              <el-input v-model="detailForm.maxAge" :readonly="true" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="最小年龄:" prop="productCname">
              <el-input v-model="detailForm.minAge" :readonly="true" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="最小乘保月份:" prop="minMonth">
              <el-input v-model="detailForm.minMonth" auto-complete="off" placeholder="请输入最小乘保月份"></el-input>
            </el-form-item>
          </el-col>

        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="最大期限:" prop="productCname">
              <el-input v-model="detailForm.maxDeadLine" :readonly="true" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="最小期限:" prop="productCname">
              <el-input v-model="detailForm.minDeadLine" :readonly="true" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="有效起期:" prop="productCname">
              <el-input v-model="detailForm.startDate" :readonly="true" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="有效止期:" prop="productCname">
              <el-input v-model="detailForm.endDate" :readonly="true" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>

        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="描述:" prop="productCname">
              <el-input v-model="detailForm.descrition" :readonly="true" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="最近修改人:" prop="productCname">
              <el-input v-model="detailForm.modifyUser" :readonly="true" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="最近修改时间:" prop="productCname">
              <el-input v-model="detailForm.modifyTime" :readonly="true" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="是否专属:" prop="productCname">
              <el-input v-model="detailForm.isExclusive" :readonly="true" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="产品所属公司:" prop="productCname">
              <el-input v-model="detailForm.productCompany" :readonly="true" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="20" :sm="12" :md="6" :lg="6">
            <el-form-item label="备注:" prop="productCname">
              <el-input v-model="detailForm.remark" :readonly="true" auto-complete="off"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-form-item label="积分比例配置:">
          </el-form-item>
          <el-table border :data="detailFormtableData" style="margin-bottom:30px;margin-top:20px;">
            <el-table-column label="有效" align="center">
              <template scope="scope">
                <div>
                  <el-checkbox :value="IsValid(scope.$index, scope.row)"></el-checkbox>
                </div>
              </template>
            </el-table-column>
            <el-table-column prop="branchName" align="center" label="机构">
            </el-table-column>
            <el-table-column prop="rate" align="center" label="比例(%)">
            </el-table-column>
          </el-table>
        </el-row>
        <el-row>
          <el-button size="small" type="primary" @click="IsexamineShow(detailForm.id)">审批历史</el-button>
        </el-row>
        <el-row v-show="examineShow" style="margin-top:10px;">
          <el-table :data="examines" border height="300" v-loading="examineLoading" highlight-current-row>
            <el-table-column prop="userId" label="审批人" width="120" sortable>
            </el-table-column>
            <el-table-column prop="applyUser" label="申请人" width="120" sortable>
            </el-table-column>
            <el-table-column prop="status" label="状态" width="120" :formatter="formatApplyStatus" sortable>
            </el-table-column>
            <el-table-column prop="approveTime" label="审批时间" sortable>
            </el-table-column>
            <el-table-column prop="applyTime" label="申请时间" sortable>
            </el-table-column>
            <el-table-column label="操作" fixed='right' width="80">
              <template scope="scope">
                <el-button size="small" @click="handleExamine(scope.$index, scope.row)">详情</el-button>
              </template>
            </el-table-column>
          </el-table>

          <el-col :span="24" class="toolbar">
            <el-pagination style="float:right" @size-change="handleSizeChanges" @current-change="handleCurrentChanges" :current-page="Examinepage" :page-sizes="[10, 20, 40, 80]" :page-size="ExaminepageSize" layout="total, sizes, prev, pager, next, jumper" :total="Examinetotal">
            </el-pagination>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click.native="detailFormVisible = false">取消</el-button>
      </div>
    </el-dialog>

    <!--审批详情界面-->
    <el-dialog title="审批历史详情信息" v-model="examinedetailFormVisible" :close-on-click-modal="false">
      <el-form :model="examineForm" label-width="100px" ref="examineForm">
        <div>
          <span>审批人:</span>
          <span class="examineFonts">{{examineForm.userId}}</span>
        </div>
        <div>
          <span>申请人:</span>
          <span class="examineFonts">{{examineForm.applyUser}}</span>
        </div>
        <div>
          <span>审批时间:</span>
          <span class="examineFonts">{{examineForm.approveTime}}</span>
        </div>
        <div>
          <span>申请时间:</span>
          <span class="examineFonts">{{examineForm.applyTime}}</span>
        </div>
        <div>
          <span>状态:</span>
          <span class="examineFonts">{{examineForm.types}}</span>
        </div>
        <div>
          <span>审批备注:</span>
          <span class="examineFonts">{{examineForm.remark}}</span>
        </div>
        <el-alert style="margin-top:10px;" title="审批内容" type="info" :closable="false">
        </el-alert>
        <div>
          <span>产品中文名:</span>
          <span class="examineFonts">{{examineForm.productCname}}</span>
        </div>
        <!-- <div>
              <span>产品英文名:</span>
              <span class="examineFonts">{{examineForm.productEname}}</span>
          </div> -->
        <div>
          <span>提前投保天数:</span>
          <span class="examineFonts">{{examineForm.advanceDay}}</span>
        </div>
        <div>
          <span>产品状态:</span>
          <span class="examineFonts">{{examineForm.status}}</span>
        </div>
        <div>
          <span>产品大类:</span>
          <span class="examineFonts">{{examineForm.productType}}</span>
        </div>
        <div>
          <span>序号:</span>
          <span class="examineFonts">{{examineForm.serialNo}}</span>
        </div>
        <div>
          <span>险种:</span>
          <span class="examineFonts">{{examineForm.riskCode}}</span>
        </div>
        <div>
          <span>是否显示:</span>
          <span class="examineFonts">{{examineForm.isShow}}</span>
        </div>
        <!-- <div>
              <span>销量:</span>
              <span class="examineFonts">{{examineForm.quantity}}</span>
          </div>
          <div>
              <span>原价:</span>
              <span class="examineFonts">{{examineForm.priPrice}}</span>
          </div>
          <div>
              <span>折扣价:</span>
              <span class="examineFonts">{{examineForm.discountPrice}}</span>
          </div>
          <div>
              <span>最低价格:</span>
              <span class="examineFonts">{{examineForm.minPrice}}</span>
          </div> -->
        <div>
          <span>最大年龄:</span>
          <span class="examineFonts">{{examineForm.maxAge}}</span>
        </div>
        <div>
          <span>最小年龄:</span>
          <span class="examineFonts">{{examineForm.minAge}}</span>
        </div>
        <div>
          <span>最大期限:</span>
          <span class="examineFonts">{{examineForm.maxDeadLine}}</span>
        </div>
        <div>
          <span>最小期限:</span>
          <span class="examineFonts">{{examineForm.minDeadLine}}</span>
        </div>
        <div>
          <span>有效起期:</span>
          <span class="examineFonts">{{examineForm.startDate}}</span>
        </div>
        <div>
          <span>有效止期:</span>
          <span class="examineFonts">{{examineForm.endDate}}</span>
        </div>
        <!-- <div>
              <span>备注:</span>
              <span class="examineFonts">{{examineForm.remark}}</span>
          </div>
          <div>
              <span>描述:</span>
              <span class="examineFonts">{{examineForm.descrition}}</span>
          </div> -->
        <div>
          <span>积分比例配置:</span>
          <el-table :data="examinedata" border style="margin-bottom:30px;margin-top:20px;">
            <!-- <el-table-column prop="status" label="是否有效" :formatter="formatExaminestatus">
              </el-table-column> -->
            <el-table-column label="是否有效" align="center">
              <template scope="scope">
                <div>
                  <el-checkbox :value="IsValid(scope.$index, scope.row)"></el-checkbox>
                </div>
              </template>
            </el-table-column>
            <el-table-column prop="branchName" label="机构" width="180" align="center">
            </el-table-column>
            <el-table-column prop="rate" label="比例(%)" align="center">
              <template scope="scope">
                <span>{{scope.row.rate}}</span>
              </template>
            </el-table-column>
          </el-table>
        </div>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click.native="examinedetailFormVisible = false">取消</el-button>
      </div>
    </el-dialog>

    <!-- 计划 -->
    <el-dialog title="设置计划" v-model="PlanFormVisible" :close-on-click-modal="false">
      <el-form label-width="120px" :rules="PlanFormRules" ref="PlanForm">
        <el-button type="primary" size="small" @click="planAdd">添加</el-button>
        <el-collapse accordion style="margin-top:20px;" @change="collapseChange">
          <el-collapse-item v-for="(temp,index) in PlanForm.tbSpPlans" :key="index" :name="planName(index)">
            <template slot="title">
              {{plantitle(index)+'['+temp.planName+']'}}
              <el-button type="danger" size="small" v-show="planShow(index)" style="float:right; margin-top:8px;margin-right:15px;" @click="planRemove(index)">删除</el-button>
              <el-button type="warning" size="small" v-show="planStatus(index,true)" style="float:right; margin-top:8px;margin-right:15px;" @click="planInvalid(index)">失效</el-button>
              <el-button type="primary" size="small" v-show="planStatus(index,false)" style="float:right; margin-top:8px;margin-right:15px;" @click="planRecover(index)">恢复</el-button>

            </template>
            <el-row>
              <el-col :xs="24" :sm="20" :md="16" :lg="11">
                <el-form-item label="ID:" prop="name">
                  <el-input v-model="temp.planId" auto-complete="off"></el-input>
                </el-form-item>
              </el-col>
              <el-col :xs="24" :sm="20" :md="16" :lg="11">
                <el-form-item label="序号:" prop="serialNo">
                  <el-input v-model="temp.serialNo" auto-complete="off"></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :xs="24" :sm="20" :md="16" :lg="11">
                <el-form-item label="计划名称:" prop="name">
                  <el-input v-model="temp.planName" auto-complete="off"></el-input>
                </el-form-item>
              </el-col>
              <el-col :xs="24" :sm="20" :md="16" :lg="11">
                <el-form-item label="最小承保年龄:" prop="name">
                  <el-input v-model="temp.minAge" auto-complete="off"></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :xs="24" :sm="20" :md="16" :lg="11">
                <el-form-item label="最大承保年龄:" prop="name">
                  <el-input v-model="temp.maxAge" auto-complete="off"></el-input>
                </el-form-item>
              </el-col>
              <el-col :xs="24" :sm="20" :md="16" :lg="11">
                <el-form-item label="最小承包期限:" prop="name">
                  <el-input v-model="temp.minDeadLine" auto-complete="off"></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :xs="24" :sm="20" :md="16" :lg="11">
                <el-form-item label="最大承保期限:" prop="name">
                  <el-input v-model="temp.maxDeadLine" auto-complete="off"></el-input>
                </el-form-item>
              </el-col>
              <el-col :xs="24" :sm="20" :md="16" :lg="11">
                <el-form-item label="随着年龄变化:" prop="name">
                  <el-select v-model="temp.ageRelated" :span="24" placeholder="是否随着年龄变化">
                    <el-option label="是" value="1"></el-option>
                    <el-option label="否" value="0"></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :xs="24" :sm="20" :md="16" :lg="11">
                <el-form-item label="最小乘保月份:" prop="minMonth">
                  <el-input v-model="temp.minMonth" auto-complete="off"></el-input>
                </el-form-item>
              </el-col>
              <el-col :xs="24" :sm="20" :md="16" :lg="11">
                <el-form-item label="立即投保:" prop="name">
                  <el-select v-model="temp.isImmediate" @change="isImmediates(temp,index)" :span="24" placeholder="是否立即投保">
                    <el-option label="是" value="1"></el-option>
                    <el-option label="否" value="0"></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :xs="24" :sm="20" :md="16" :lg="11">
                <el-form-item label="最低职业工种等级" prop="classlevelMin" v-show="Isclasslevel">
                  <el-input v-model="temp.classlevel.classlevelMin" auto-complete="off"></el-input>
                </el-form-item>
              </el-col>
              <el-col :xs="24" :sm="20" :md="16" :lg="11">
                <el-form-item label="最高职业工种等级" prop="classlevelMax" v-show="Isclasslevel">
                  <el-input v-model="temp.classlevel.classlevelMax" auto-complete="off"></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :xs="24" :sm="20" :md="16" :lg="11">
                <el-form-item label="详情页面提示" prop="alertMsg">
                  <el-input v-model="temp.classlevel.alertMsg" auto-complete="off"></el-input>
                </el-form-item>
              </el-col>
              <el-col :xs="24" :sm="20" :md="16" :lg="11">
                <el-form-item label="页面提示价格" prop="showPrice">
                  <el-input v-model="temp.classlevel.showPrice" auto-complete="off"></el-input>
                </el-form-item>
              </el-col>
              <el-col :xs="24" :sm="20" :md="16" :lg="11">
                <el-form-item label=" 默认年龄" prop="defaultAge">
                  <el-input v-model="temp.classlevel.defaultAge" auto-complete="off"></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <!-- <el-row>
              <el-col :xs="24" :sm="20" :md="16" :lg="11">
                <el-form-item label="问卷ID" prop="queId">
                  <el-input v-model="temp.classlevel.queId" auto-complete="off"></el-input>
                </el-form-item>
              </el-col>
              <el-col :xs="24" :sm="20" :md="16" :lg="11">
                <el-form-item label=" 上传文件ID" prop="uploadId">
                  <el-input v-model="temp.classlevel.uploadId" auto-complete="off"></el-input>
                </el-form-item>
              </el-col>
            </el-row> -->
            <el-form-item label="投保声明:" prop="name" style="margin-top:10px;">
              <div class="kboder" @click='statement(temp,index,"statement"+index)' style="height:80px;min-width:140px;width:88%;">
                <div :id="'statement'+index" class="ksboder">
                </div>
              </div>
            </el-form-item>
            <el-form-item label="理赔须知:" prop="name" style="margin-top:10px;">
              <div class="kboder" @click="notice(temp,index,'notice'+index)" style="height:80px;min-width:140px;width:88%;">
                <div :id="'notice'+index" class="ksboder">
                </div>
              </div>
            </el-form-item>
            <el-form-item label="备注:" prop="name" style="margin-top:10px;">
              <el-input type="textarea" v-model="temp.remark" auto-complete="off" style="width:88%;"></el-input>
            </el-form-item>
          </el-collapse-item>
        </el-collapse>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click.native="PlanFormVisible = false;ISstatement=false;ISnotice=false;">取消</el-button>
        <el-button type="primary" @click.native="PlanSubmit" :loading="PlanLoading">提交</el-button>
      </div>
    </el-dialog>
    <!--配置界面-->
    <!-- <el-dialog title="详情"  v-model="configFormVisible" :close-on-click-modal="false">
      <el-form :model="configForm" label-width="120px">

      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click.native="configFormVisible = false">取消</el-button>
        <el-button type="primary" @click.native="addSubmit" :loading="addLoading">提交</el-button>
      </div>
    </el-dialog> -->

    <!-- 专属信息  -->
    <el-dialog :title="'['+exclusiveinfmationTitle+']已专属以下用户'" size="full" v-model="exclusiveinfmationVisible" :close-on-click-modal="false">
      <!-- <el-row>
        <el-col>
           <h1>{{exclusiveinfmationTitle}}已专属以下用户</h1>
        </el-col>
      </el-row> -->
      <el-row>
        <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
          <el-form :inline="true" :model="exclusiveinfmationfilters">
            <el-form-item>
              <el-input size="small" style="width:200px;" v-model.trim="exclusiveinfmationfilters.userCode" placeholder="用户编码"></el-input>
            </el-form-item>
            <el-form-item>
              <el-input size="small" style="width:200px;" v-model.trim="exclusiveinfmationfilters.agrementNo" placeholder="业务关系代码"></el-input>
            </el-form-item>
            <el-form-item>
              <el-input size="small" style="width:200px;" v-model.trim="exclusiveinfmationfilters.userName" placeholder="真实姓名"></el-input>
            </el-form-item>
            <el-form-item>
              <el-select size="small" clearable style="width:200px;" v-model.trim="exclusiveinfmationfilters.branchCode" placeholder="分公司">
                <!-- <el-option  label="全部公司"  value=""  ></el-option> -->
                <el-option v-for="(item,index) in branchCodes" :key="index" :label="item.codeCname" :value="item.code"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item>
              <el-button size="small" icon="search" type="primary" v-on:click="getUsers('yes')">查询</el-button>
            </el-form-item>
            <el-form-item>
              <el-button size="small" type="warning" icon="plus" @click="handleAddexclusive">添加</el-button>
            </el-form-item>
          </el-form>
        </el-col>
        <el-table :data="exclusiveinfmationdata" border :height="winHeight-320" v-loading="exclusiveinfmationLoading" @selection-change="exclusiveselsChange" highlight-current-row>
          <el-table-column type="selection" width="55">
          </el-table-column>
          <el-table-column prop="userName" label="用户姓名" width="140">
          </el-table-column>
          <el-table-column prop="userCode" label="用户编码" min-width="140">
          </el-table-column>
          <el-table-column prop="agrementNo" label="业务关系代码" min-width="150">
          </el-table-column>
          <el-table-column prop="userType" width="120" label="用户类别" :formatter="formatUserType">
          </el-table-column>
          <el-table-column prop="mobile" min-width="160" label="手机号">
          </el-table-column>
          <el-table-column prop="typeState" min-width="100" label="成交量">
          </el-table-column>
          <el-table-column prop="popularity" min-width="100" label="人气">
          </el-table-column>
          <!-- <el-table-column label="操作" fixed='right' width="80">
            <template scope="scope">
              <el-button size="small" @click="handleqx(scope.$index, scope.row)">取消</el-button>
            </template>
          </el-table-column> -->
        </el-table>
        <!--工具条-->
        <el-col :span="24" class="toolbar">
          <el-button type="danger" size="small" :disabled="this.exclusivesels.length===0" @click="handleqx">取消专属</el-button>
          <el-pagination style="float:right" @size-change="handleSizeexclusive" @current-change="handleCurrentexclusive" :current-page="exclusivepage" :page-sizes="[10, 20, 40, 80]" :page-size="exclusivepageSize" layout="total, sizes, prev, pager, next, jumper" :total="exclusivetotal">
          </el-pagination>
        </el-col>
      </el-row>

      <div slot="footer" align="center" class="dialog-footer">
        <el-button @click.native="exclusiveinfmationVisible = false">取消</el-button>
      </div>
    </el-dialog>

    <!-- 添加专属用户  -->
    <el-dialog title="添加专属用户" size="large" v-model="exclusiveAddVisible" :close-on-click-modal="false">
      <el-row>
        <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
          <el-form :inline="true" :model="exclusiveAddfilters">
            <el-form-item>
              <el-input size="small" style="width:200px;" v-model.trim="exclusiveAddfilters.userCode" placeholder="用户编码"></el-input>
            </el-form-item>
            <el-form-item>
              <el-input size="small" style="width:200px;" v-model.trim="exclusiveAddfilters.agrementNo" placeholder="业务关系代码"></el-input>
            </el-form-item>
            <el-form-item>
              <el-input size="small" style="width:200px;" v-model.trim="exclusiveAddfilters.userName" placeholder="真实姓名"></el-input>
            </el-form-item>
            <el-form-item>
              <el-select size="small" clearable style="width:200px;" v-model.trim="exclusiveAddfilters.branchCode" placeholder="分公司">
                <!-- <el-option  label="全部公司"  value=""  ></el-option> -->
                <el-option v-for="(item,index) in branchCodes" :key="index" :label="item.codeCname" :value="item.code"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item>
              <el-button size="small" icon="search" type="primary" v-on:click="getUsers('no')">查询</el-button>
            </el-form-item>
          </el-form>
        </el-col>
        <el-table :data="exclusiveAdddata" border :height="winHeight-350" v-loading="exclusiveAddLoading" highlight-current-row @selection-change="exclusiveAddselsChange" style="width: 100%;">
          <el-table-column type="selection" width="55">
          </el-table-column>
          <el-table-column prop="userName" label="用户姓名" width="140">
          </el-table-column>
          <el-table-column prop="userCode" label="用户编码" min-width="140">
          </el-table-column>
          <el-table-column prop="agrementNo" label="业务关系代码" min-width="150">
          </el-table-column>
          <el-table-column prop="userType" width="120" label="用户类别" :formatter="formatUserType">
          </el-table-column>
          <el-table-column prop="mobile" min-width="160" label="手机号">
          </el-table-column>
          <el-table-column prop="typeState" min-width="100" label="成交量">
          </el-table-column>
          <el-table-column prop="popularity" min-width="100" label="人气">
          </el-table-column>
        </el-table>
        <!--工具条-->
        <el-col :span="24" class="toolbar">
          <el-pagination style="float:right" @size-change="handleSizeexclusiveAdd" @current-change="handleCurrentexclusiveAdd" :current-page="exclusiveAddpage" :page-sizes="[10, 20, 40, 80]" :page-size="exclusiveAddpageSize" layout="total, sizes, prev, pager, next, jumper" :total="exclusiveAddtotal">
          </el-pagination>
        </el-col>
      </el-row>

      <div slot="footer" align="center" class="dialog-footer">
        <el-button @click.native="exclusiveAddVisible = false">取消</el-button>
        <el-button type="primary" @click.native="exclusiveAddSubmit" :loading="exclusiveAddsLoading">确定</el-button>
      </div>
    </el-dialog>

    <!-- editor -->
    <el-dialog title="修改" size="large" v-model="editorVisible" :close-on-click-modal="false">

      <vue-editor v-model="content"></vue-editor>
      <!-- <editor ref="myTextEditor" :fileName="'myFile'" :canCrop="canCrop" :uploadUrl="uploadUrl" v-model="content">
      </editor> -->

      <div slot="footer" class="dialog-footer">
        <el-button @click.native="editorVisible = false">取消</el-button>
        <el-button type="primary" @click.native="editorSubmit" :loading="editorLoading">确定</el-button>
      </div>
    </el-dialog>

    <!-- 管理车牌 -->
    <el-dialog title="管理车牌(下列车牌不允许投保)" size="tiny" v-model="manageLicensenoVisible" v-loading="manageLicensenoLoading" :close-on-click-modal="false">
      <el-form :inline="true">
        <el-form-item>
          <el-input size="small" style="width:200px;" v-model.trim="Addlicenseno" placeholder="请输入车牌号前两位"></el-input>
        </el-form-item>
        <el-form-item style="float:right;">
          <el-button size="small" type="primary" v-on:click="Onlicenseno">添加车牌</el-button>
        </el-form-item>
      </el-form>
      <el-table :data="manageLicensenodata" border :height="240" highlight-current-row style="width: 100%;">
        <el-table-column prop="code" align="center" label="车牌" min-width="140" show-overflow-tooltip>
        </el-table-column>
        <el-table-column align="center" label="操作" width="80">
          <template scope="scope">
            <el-button size="small" type="danger" @click="manageLicensenoDel(scope.$index, scope.row)">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
      <!--工具条-->
      <el-col :span="24" class="toolbar">
        <el-pagination style="float:right" @size-change="manageLicensenoSizeChange" @current-change="manageLicensenoCurrentChange" :current-page="manageLicensenopage" :page-sizes="[10, 20, 40, 80]" :page-size="manageLicensenopageSize" layout="total, sizes, prev, pager, next, jumper" :total="manageLicensenototal">
        </el-pagination>
      </el-col>
      <div slot="footer" align="center" class="dialog-footer">
        <el-button type="primary" @click.native="manageLicensenoVisible = false">关闭</el-button>
      </div>
    </el-dialog>
  </section>
</template>

<script>
import util from '../../common/js/util';
import { mapState, mapActions } from 'vuex';
import commons from '../../common/js/common';
//import NProgress from 'nprogress'
import { getUserListPage, removeProduct, batchRemoveUser, editProduct, addProduct, editHot, getHotProduct, codeNodeList, base, picURL, planList, addPlans, rebackProduct, approve, approveHis, treeNextBranchList, getExclusive, setExclusive, plateList, addPlate, removePlate } from '../../api/api';
import { VueEditor, Quill } from 'vue2-editor';
import editor from '../../components/Quilleditor.vue'
export default {
  components: {
    editor,
    VueEditor,
    Quill
  },
  data() {
    return {
      canCrop: false,
      /*测试上传图片的接口，返回结构为{url:''}*/
      uploadUrl: base + '/sale/admin/uploadWeb/upload',
      content: '',
      editorpictureRiskcode: '',
      // ImgUrlData:{
      //   parampath: '3105'
      // },
      filters: {
        productCname: '',
        riskCode: '',
        startDate: '',
        endDate: '',
        riskCodes: '',
        productCompany: '',
        productCompanys: '',
        status: ''
      },
      exclusiveinfmationfilters: {
        userCode: '',
        agrementNo: '',
        userName: '',
        branchCode: ''
      },
      exclusiveAddfilters: {
        userCode: '',
        agrementNo: '',
        userName: '',
        branchCode: ''
      },
      editData: {},
      approveData: {},
      detailForm: {},
      examineForm: {},
      confirmationStatus: false,
      productAdd: false,
      productApprove: false,
      productDetail: false,
      productExport: false,
      productPlan: false,
      productQuery: false,
      productUpdate: false,
      commonID: '',
      commonObj: '',
      Addlicenseno: '',
      commonIndex: '',
      ExamineId: '',
      inputCode: '',
      originalStatus: '',
      activeName: ['1'],
      picURL: picURL,
      baseUrl: base,
      riskCodes: [],
      productCompanys: [],
      branchCodes: [],
      examines: [],
      exclusiveinfmationdata: [],
      manageLicensenodata: [],
      exclusiveAdddata: [],
      examinedata: [],
      detailFormtableData: [],
      fileList1IntroduceUrl: [],
      fileList1SchemeUrl: [],
      fileList1ImgUrl: [],
      fileList1DetailUrl: [],
      fileList1ImgThumbnailUrl: [],
      fileList2IntroduceUrl: [],
      fileList2SchemeUrl: [],
      fileList2ImgUrl: [],
      fileList2DetailUrl: [],
      fileList2ImgThumbnailUrl: [],
      fileList: [[], []],
      fileLists: [[]],
      products: [],
      IntegralAllotData: [],
      IntegralAllotDatas: [],
      uploadValue: '',
      total: 0,
      page: 1,
      pageSize: 10,
      exclusivepage: 1,
      exclusivepageSize: 10,
      exclusivetotal: 0,
      exclusiveproductId: '',
      exclusiveAddpage: 1,
      exclusiveAddpageSize: 10,
      exclusiveAddtotal: 0,
      lists: [],
      exportTotal: 0,
      Examinetotal: 0,
      Examinepage: 1,
      ExaminepageSize: 10,
      manageLicensenopage: 1,
      manageLicensenopageSize: 10,
      manageLicensenototal: 0,
      loading: '',
      IsValidate: [],
      allIs: false,
      listLoading: false,
      sels: [],//列表选中列
      exclusivesels: [],//取消专属列表选中项
      exclusiveAddsels: [],//添加专属列表选中项
      download: true,
      ishotValue: false,
      showOther: false,//显示其他设置
      showOtherTitle: '显示',
      editFormVisible: false,//修改界面是否显示
      PlanFormVisible: false,//热销界面是否显示
      editorVisible: false,//edtor界面是否显示
      exclusiveinfmationVisible: false, //专属信息界面是否显示
      exclusiveAddVisible: false,//添加专属界面是否显示
      manageLicensenoVisible: false,//管理车牌界面是否显示
      EditStatus: false,
      detailFormVisible: false,
      examineShow: false,
      examinedetailFormVisible: false,
      exclusiveinfmationTitle: '',
      Atitle: '修改',
      cancel: '取消',
      submit: '提交',
      approveId: '',
      approveRemark: '',
      showLicenseno: false,
      ISstatement: false,
      ISnotice: false,
      ISpreview: false,
      editLoading: false,
      PlanLoading: false,
      examineLoading: false,
      exclusiveAddsLoading: false,
      editorLoading: false,
      exclusiveinfmationLoading: false,
      manageLicensenoLoading: false,
      exclusiveAddLoading: false,
      Isclasslevel: false,//是否显示职业等级
      InputStatus: false,//编辑input显示
      editFormRules: {
        productCname: [
          { required: true, message: '请输入中文名', trigger: 'blur' }
        ],
        riskCode: [
          { required: true, message: '请选择险种', trigger: 'change' }
        ],
        productCname: [
          { required: true, message: '请输入中文名', trigger: 'blur' }
        ],
        productType: [
          { required: true, message: '请输入产品大类', trigger: 'blur' }
        ],
        status: [
          { required: true, message: '请选择产品状态', trigger: 'blur' }
        ],
        serialNo: [
          { required: true, message: '请输入序号', trigger: 'blur' }
        ],
        maxAge: [
          { required: true, message: '请输入最大年龄', trigger: 'blur' }
        ],
        minAge: [
          { required: true, message: '请输入最小年龄', trigger: 'blur' }
        ],
        maxDeadLine: [
          { required: true, message: '请输入最大期限', trigger: 'blur' }
        ],
        minDeadLine: [
          { required: true, message: '请输入最小期限', trigger: 'blur' }
        ],
        advanceDay: [
          { required: true, message: '请输入提前投保天数', trigger: 'blur' }
        ],
        isExclusive: [
          { required: true, message: '请选择是否专属', trigger: 'blur' }
        ]
        ,
        riskPrintName: [
          { required: true, message: '请输入险种打印名称', trigger: 'blur' }
        ]
      },
      PlanFormRules: {
        serialNo: [
          { required: true, message: '请输入序号', trigger: 'blur' }
        ]
      },
      //修改界面数据
      editForm: {
        id: '',
        productCname: '',
        productEname: '',
        productType: '',
        serialNo: '',
        riskCode: '',
        isShow: '',
        element: '',
        isHot: '',
        quantity: '',
        priPrice: '',
        discountPrice: '',
        minPrice: '',
        introduceUrl: '',
        schemeUrl: '',
        imgUrl: '',
        remark: '',
        detailUrl: '',
        imgThumbnailUrl: '',
        descrition: '',
        detail: '',
        deadLine: '',
        maxAge: '',
        riskPrintName: '',
        minAge: '',
        status: '',
        isExclusive: '',
        maxDeadLine: '',
        minDeadLine: '',
        startDate: '',
        endDate: '',
        showOther: '1',
        advanceDay: '',
        riskCodes: '',
        productCompany: '',
        productCompanys: '',
        isQuota: '1',
        baseStatus: '1',
        minMonth: '',
        showEle: {
          "moreInsured": false,
          "isShowOther": false,
          "occupation": false,
          "locationHouse": false,
          "address": false,
          "houseType": false,
          "destination": false,
          "abroadDestination": false,
          "limitLicenseno": false,
          "vinno": false,
          "licenseno": false,
          'sameInsure': false,
          'queId': '',
          'uploadId': '',
          'minInsure': '',
          'isAxtx': false,
          'isShowEnt': true,
          'mainInsureVal': false,
          'occupationLimit': false,
          'inputConfigId': '',
          'isRelOther': false
        }
      },
      temps: [{
        planId: '',
        planName: '',
        serialNo: '',
        remark: ''
      }],
      addFormVisible: false,//新增界面是否显示
      addLoading: false,
      addFormRules: {
        productCname: [
          { required: true, message: '请输入中文名', trigger: 'blur' }
        ],
        riskCode: [
          { required: true, message: '请选择险种', trigger: 'change' }
        ],
        productCname: [
          { required: true, message: '请输入中文名', trigger: 'blur' }
        ],
        productType: [
          { required: true, message: '请输入产品大类', trigger: 'blur' }
        ],
        status: [
          { required: true, message: '请选择产品状态', trigger: 'blur' }
        ],
        serialNo: [
          { required: true, message: '请输入序号', trigger: 'blur' }
        ],
        maxAge: [
          { required: true, message: '请输入最大年龄', trigger: 'blur' }
        ],
        minAge: [
          { required: true, message: '请输入最小年龄', trigger: 'blur' }
        ],
        maxDeadLine: [
          { required: true, message: '请输入最大期限', trigger: 'blur' }
        ],
        minDeadLine: [
          { required: true, message: '请输入最小期限', trigger: 'blur' }
        ],
        startDate: [
          { type: 'date', required: true, message: '请选择有效起期', trigger: 'change' }
        ],
        endDate: [
          { type: 'date', required: true, message: '请选择有效止期', trigger: 'change' }
        ],
        advanceDay: [
          { required: true, message: '请输入提前投保天数', trigger: 'blur' }
        ],
        minPrice: [
          { required: true, message: '请输入最低价格', trigger: 'blur' }
        ],
        isExclusive: [
          { required: true, message: '请选择是否专属', trigger: 'blur' }
        ],
        riskPrintName: [
          { required: true, message: '请输入险种打印名称', trigger: 'blur' }
        ]

      },
      //新增界面数据
      addForm: {
        productCname: '',
        productEname: '',
        productType: '',
        serialNo: '',
        riskCode: '',
        isShow: '',
        quantity: '',
        priPrice: '',
        discountPrice: '',
        minPrice: '',
        introduceUrl: '',
        schemeUrl: '',
        imgUrl: '',
        isHot: '',
        remark: '',
        detailUrl: '',
        imgThumbnailUrl: '',
        descrition: '',
        detail: '',
        status: '',
        maxAge: '',
        isExclusive: '',
        minAge: '',
        riskPrintName: '',
        isAxtx: false,
        maxDeadLine: '',
        minDeadLine: '',
        advanceDay: '',
        showOther: '1',
        startDate: '',
        endDate: '',
        riskCodes: '',
        productCompany: '',
        isQuota: '1',
        baseStatus: '1',
        minMonth: '',
        showEle: {
          moreInsured: false,
          isShowOther: false,
          occupation: false,
          locationHouse: false,
          address: false,
          houseType: false,
          destination: false,
          abroadDestination: false,
          limitLicenseno: false,
          vinno: false,
          licenseno: false,
          sameInsure: false,
          queId: '',
          uploadId: '',
          minInsure: '',
          inputConfigId: '',
          isAxtx: false,
          isShowEnt: true,
          mainInsureVal: false,
          occupationLimit: false,
          'isRelOther': false
        }
      },
      PlanForm: {
        id: '',
        tbSpPlans: [{
          planId: '',
          planName: '',
          serialNo: '',
          minAge: '',
          maxAge: '',
          limitTerm: '',
          maxDeadLine: '',
          minDeadLine: '',
          ageRelated: '0',
          isImmediate: '0',
          remark: '',
          statement: '',
          notice: '',
          clauseUrl: '',
          clauseContent: '',
          classlevel: {
            classlevelMin: '',
            classlevelMax: '',
            alertMsg: '',
            defaultAge: '',
            showPrice: "",
            // queId:'',
            // uploadId:'',
            minInsure: '',
            inputConfigId: '',
            isShowEnt: '',
            mainInsureVal: '',
            occupationLimit: ''
          }
        }]
      },
    }
  },
  computed: mapState({
    user: 'user',
    clist: 'riskCodelist',
    blist: 'branchCodelist',
    winHeight: 'winHeight',
    pclist: 'productCompanylist'
  }),
  methods: {
    ...mapActions([
      'findProductCompanylist'
    ]),
    //审批状态
    formatApplyStatus: function (row, column) {
      return row.status == "0" ? "待审批" : (row.status == "1" ? "通过" : "不通过");
    },
    //审批时间
    formatApproveTime: function (row, column) {
      return commons.getDaytime(row.approveTime, 1, false);
    },
    //申请时间
    formatApplyTime: function (row, column) {
      return commons.getDaytime(row.applyTime, 1, false);
    },
    //用户类别
    formatUserType: function (row, column) {
      return commons.customType(row.userType);
    },
    //险种打印名称
    riskName: function () {
      this.addForm.riskPrintName = this.addForm.productType;
    },
    //审批详情状态
    // formatExaminestatus:function(row, column){
    //   return row.status=="0"?'否':"是";
    // },
    //上传图片校验险种
    confirmationRiskCode(value) {
      if (!value || value == "") {
        this.confirmationStatus = true;
        this.$message({
          message: '请先选择险种!',
          type: 'warning'
        });
      }
      else {
        this.confirmationStatus = false;
      }
    },
    //初始积分分配是否有效
    IsValid(index, row) {
      try {
        if (row.status == "1") {
          return true;
        }
        else {
          return false;
        }

      }
      catch (error) {
        return false;
      }

    },
    IsEdit(index, row) {
      if (this.productUpdate) {
        return row.tbSpApprove ? false : true;
      } else {
        return false;
      }
    },
    IsApprove(index, row) {
      if (this.productApprove) {
        return row.tbSpApprove ? true : false;
      } else {
        return false;
      }
    },
    ApproveUser(index, row) {
      var approveAuth = row.approveAuth;
      var userArr = this.user.approve;
      return commons.ApproveUser(approveAuth, userArr);
    },
    configUser() {
      var userArr = this.user.configAuth;
      return !commons.contains(userArr, '1');
    },
    handleValid: function (index, row, event) {
      if (this.EditStatus) {
        this.IntegralAllotData[index].status = row.status == '1' ? '0' : '1';
      }
      else {
        this.IntegralAllotDatas[index].status = row.status == '1' ? '0' : '1';
      }
    },
    //是否为安行天下
    AllFalse(value, str) {
      if (str == "add") {
        if (value) {
          this.allIs = value ? true : false;
          this.addForm.showEle.moreInsured = false;
          this.addForm.showEle.occupation = false;
          this.addForm.isQuota = "0";
          this.addForm.showEle.isShowOther = false;
        }
      } else {
        if (value) {
          this.allIs = value ? true : false;
          this.editForm.showEle.moreInsured = false;
          this.editForm.showEle.occupation = false;
          this.editForm.isQuota = "0";
          this.editForm.showEle.isShowOther = false;
        }
      }
    },
    textContent(str, index, p) {
      if (p == 's') {
        $("#statement" + index).html(str);
      }
      else {
        $('#notice' + index).html(str);
      }

    },
    IsexamineShow: function (id) {
      if (!this.examineShow) {
        this.getExamine();
      }
      this.examineShow = !this.examineShow;


    },
    //限制车牌
    LicensenoCilck(value) {
      this.showLicenseno = !value;
    },
    otherCilck(value) {
      if (value) {
        this.showOther = true;
      }
      else {
        this.showOther = false;
      }
    },
    FileData(value) {
      if (value) {
        return value;
      }
    },
    editRemoveIntroduceUrl(file, fileList) {
      this.editForm.introduceUrl = commons.RemoveUrl(this.editForm.introduceUrl, file);
    },
    editRemoveSchemeUrl(file, fileList) {
      this.editForm.schemeUrl = commons.RemoveUrl(this.editForm.schemeUrl, file);
    },
    editRemoveImgUrl(file, fileList) {
      this.editForm.imgUrl = commons.RemoveUrl(this.editForm.imgUrl, file);
    },
    editRemoveDetailUrl(file, fileList) {
      this.editForm.detailUrl = commons.RemoveUrl(this.editForm.detailUrl, file);
    },
    editRemoveImgThumbnailUrl(file, fileList) {
      this.editForm.imgThumbnailUrl = commons.RemoveUrl(this.editForm.imgThumbnailUrl, file);
    },
    handleRemoveIntroduceUrl(file, fileList) {
      this.addForm.IntroduceUrl = commons.RemoveUrl(this.addForm.IntroduceUrl, file);
    },
    handleRemoveSchemeUrl(file, fileList) {
      this.addForm.SchemeUrl = commons.RemoveUrl(this.addForm.SchemeUrl, file);
    },
    handleRemoveImgUrl(file, fileList) {
      this.addForm.ImgUrl = commons.RemoveUrl(this.addForm.ImgUrl, file);
    },
    handleRemoveDetailUrl(file, fileList) {
      this.addForm.DetailUrl = commons.RemoveUrl(this.addForm.DetailUrl, file);
    },
    handleRemoveImgThumbnailUrl(file, fileList) {
      this.addForm.imgThumbnailUrl = commons.RemoveUrl(this.addForm.imgThumbnailUrl, file);
    },
    //产品介绍
    handleSuccessIntroduceUrl(response, file, fileList) {
      this.addForm.introduceUrl = commons.SuccessUrl(this.addForm.introduceUrl, file, true);
    },
    editSuccessIntroduceUrl(response, file, fileList) {
      this.editForm.introduceUrl = commons.SuccessUrl(this.editForm.introduceUrl, file, true);
    },
    //保障方案
    handleSuccessSchemeUrl(response, file, fileList) {
      this.addForm.schemeUrl = commons.SuccessUrl(this.addForm.schemeUrl, file, true);
    },
    editSuccessSchemeUrl(response, file, fileList) {
      this.editForm.schemeUrl = commons.SuccessUrl(this.editForm.schemeUrl, file, true);
    },
    //图标地址
    handleSuccessImgUrl(response, file, fileList) {
      this.addForm.imgUrl = commons.SuccessUrl(this.addForm.imgUrl, file, true);
    },
    editSuccessImgUrl(response, file, fileList) {
      this.editForm.imgUrl = commons.SuccessUrl(this.editForm.imgUrl, file, true);
    },
    //服务详情
    handleSuccessDetailUrl(response, file, fileList) {
      this.addForm.detailUrl = commons.SuccessUrl(this.addForm.detailUrl, file, true);
    },
    editSuccessDetailUrl(response, file, fileList) {
      this.editForm.detailUrl = commons.SuccessUrl(this.editForm.detailUrl, file, true);
    },
    //产品缩略图
    handleSuccessImgThumbnailUrl(response, file, fileList) {
      this.addForm.imgThumbnailUrl = commons.SuccessUrl(this.addForm.imgThumbnailUrl, file, true);
    },
    editSuccessImgThumbnailUrl(response, file, fileList) {
      this.editForm.imgThumbnailUrl = commons.SuccessUrl(this.editForm.imgThumbnailUrl, file, true);
    },
    //add保险条款
    AddhandlePreview(response, file) {
      var index = this.uploadValue;
      this.PlanForm.tbSpPlans[index].clauseUrl = commons.SuccessUrl(this.PlanForm.tbSpPlans[index].clauseUrl, file, true);
    },
    //edit保险条款
    EdithandlePreview(file, fileList) {
      var index = this.commonIndex;
      this.PlanForm.tbSpPlans[index].clauseUrl = commons.RemoveUrl(this.PlanForm.tbSpPlans[index].clauseUrl, file);
    },
    uploadClause(index) {
      this.uploadValue = index;
    },
    clausehandleRemove(file, fileList) {
    },
    submitUploadAdd() {
      this.$refs.upload.submit();
    },
    submitUploadEdit() {
      this.$refs.upload2.submit();
    },
    planAdd: function () {
      this.PlanForm.tbSpPlans.push({
        planId: '',
        planName: '',
        serialNo: '',
        maxAge: '',
        minAge: '',
        limitTerm: '',
        maxDeadLine: '',
        minDeadLine: '',
        ageRelated: '0',
        isImmediate: '0',
        remark: '',
        statement: '',
        status: '1',
        notice: '',
        clauseUrl: '',
        classlevel: {
          classlevelMax: '',
          classlevelMin: '',
          alertMsg: '',
          showPrice: "",
          defaultAge: '',
          // queId:'',
          //   uploadId:'',
          minInsure: '',
          inputConfigId: '',
          isShowEnt: '',
          mainInsureVal: '',
          occupationLimit: ''
        }
      });
    },
    planRemove: function (index) {
      this.PlanForm.tbSpPlans.splice(index, 1);
    },
    planInvalid: function (index) {
      this.PlanForm.tbSpPlans[index].status = '0';
    },
    planRecover: function (index) {
      this.PlanForm.tbSpPlans[index].status = '1';
    },
    planShow: function (index) {
      var length = this.PlanForm.tbSpPlans.length;
      if (length <= 1) {
        return false;
      }
      else {
        return true;
      }
    },
    planStatus: function (index, bool) {
      if (bool) {
        return this.PlanForm.tbSpPlans[index].status == "1" ? true : false;
      }
      else {
        return this.PlanForm.tbSpPlans[index].status == "1" ? false : true;
      }
    },
    ShowFileName: function () {
      let files = $("#file").files;
    },
    buttonShow: function (index, row) {
      if (row.status == 1) {
        return true;
      }
      else {
        return false
      }
    },
    buttonShows: function (index, row) {
      if (row.status == 0) {
        return true;
      }
      else {
        return false
      }
    },
    //险种编码转换
    formatRisk: function (row, column) {
      return commons.CodeName(this.clist, row.riskCode, 'RiskCode');
    },
    formatPC: function (row, column) {
      return commons.CodeName(this.pclist, row.productCompany, 'ProductCompany');
    },
    formatOrg: function (row, column) {
      return row.organizationId && row.organizationId.name ? row.organizationId.name : '-';
    },
    formatStatus: function (row, column) {
      return commons.articleStatus(row.status);
    },
    handleCurrentChange(val) {
      this.page = val;
      this.getProducts(true);
    },
    handleSizeChange(val) {
      this.pageSize = val;
      this.getProducts(true);
    },
    handleCurrentChanges(val) {
      this.Examinepage = val;
      this.getExamine();
    },
    handleSizeChanges(val) {
      this.ExaminepageSize = val;
      this.getExamine();
    },
    handleSizeexclusive(val) {
      this.exclusivepageSize = val;
      this.getUsers('yes');
    },
    handleCurrentexclusive(val) {
      this.exclusivepage = val;
      this.getUsers('yes');
    },
    handleSizeexclusiveAdd(val) {
      this.exclusiveAddpageSize = val;
      this.getUsers('no');
    },
    handleCurrentexclusiveAdd(val) {
      this.exclusiveAddpage = val;
      this.getUsers('no');
    },
    manageLicensenoSizeChange(val) {
      this.manageLicensenopageSize = val;
    },
    manageLicensenoCurrentChange(val) {
      this.manageLicensenopage = val;
    },
    //设置专属
    exclusiveClick: function () {
      if (this.sels.length > 1) {
        this.$message({
          message: '只能对一个产品设置专属!',
          type: 'error'
        });
      }
      else {
        var tbSpApprove = this.sels.map(item => item.tbSpApprove).toString();
        if (tbSpApprove) {
          this.$message({
            message: '待审批产品不能设置专属!',
            type: 'error'
          });
        }
        else {
          var isExclusive = this.sels.map(item => item.isExclusive).toString();
          if (isExclusive == "1") {
            this.branchCodes = this.blist.result;
            this.exclusiveinfmationVisible = true;
            this.exclusiveproductId = this.sels.map(item => item.id);
            this.exclusiveinfmationTitle = this.sels.map(item => item.productCname);
            this.getUsers('yes');
          }
          else {
            this.$message({
              message: '该产品不是专属产品!',
              type: 'error'
            });
          }

        }
      }
    },
    //详情
    handleDetail: function (index, row) {
      let _this = this;
      _this.ExamineId = row.id;
      _this.examineShow = false;
      // _this.examines = [];
      _this.detailFormVisible = true;
      _this.detailForm = Object.assign({}, row);
      _this.detailForm.id = row.id;
      _this.detailForm.isShow = row.isShow == "1" ? "是" : "否";
      _this.detailForm.isExclusive = row.isExclusive == "1" ? "是" : "否";
      _this.detailForm.type = commons.articleType(row.type);
      _this.detailForm.status = commons.articleStatus(row.status);
      _this.detailForm.riskCode = commons.CodeName(this.clist, row.riskCode, 'RiskCode');
      _this.detailForm.productCompany = commons.CodeName(this.pclist, row.productCompany, 'ProductCompany');
      _this.detailForm.createDate = commons.getDaytime(row.createDate, 1, false);
      // _this.detailForm.modifyTime = commons.getDaytime(row.modifyTime, 1, false);
      _this.detailFormtableData = row.productConfigs;
    },
    //审批历史列表
    getExamine() {
      let para = new FormData();
      para.append('pageSize', this.ExaminepageSize);
      para.append('pageNumber', this.Examinepage);
      para.append('id', this.ExamineId);
      para.append('approveType', '1');
      this.examineLoading = true;
      approveHis(para).then((res) => {
        if (res.data.success) {
          this.examines = res.data.result.content;
          this.Examinetotal = res.data.result.totalElements;
        }
        this.examineLoading = false;
      }).catch(() => {
        this.examineLoading = true;
      });
    },
    //获取用户列表
    getProducts(bool) {
      if (!bool) {
        this.loading = this.$loading({
          lock: true,
          text: '正在导出',
          spinner: 'el-icon-loading',
          background: 'rgba(0, 0, 0, 0.7)'
        });
      }
      let para = new FormData();
      para.append("pageSize", bool ? this.pageSize : this.exportTotal);
      para.append("pageNumber", bool ? this.page : 1);
      para.append("productCname", this.filters.productCname);
      para.append("riskCode", this.filters.riskCode);
      para.append("startDate", commons.changeDate(this.filters.startDate, 'start'));
      para.append("endDate", commons.changeDate(this.filters.endDate, 'end'));
      para.append("branchCode", '');
      para.append("status", this.filters.status);
      this.listLoading = bool;
      //NProgress.start();
      getUserListPage(para).then((res) => {
        this.lists = res.data.result.content;
        this.total = res.data.result.totalElements;
        this.exportTotal = res.data.result.totalElements;


        this.listLoading = false;
        if (!bool) {
          this.loading.close();
          this.export2Excel();
        }
        else {
          this.riskCodes = this.clist.result;
          this.products = res.data.result.content;
          this.productCompanys = this.pclist;
        }
        //NProgress.done();
      });



    },

    collapseChange: function (str) {
      var tempdata = [];
      let _this = this;
      try {
        if (str >= 0) {
          _this.commonIndex = str;
          $('#statement' + str).html(_this.PlanForm.tbSpPlans[str].statement);
          $('#notice' + str).html(_this.PlanForm.tbSpPlans[str].notice);
        }
      }
      catch (err) {

      }


    },

    Detail: function (str) {
      let _this = this;
      _this.content = '';
      if (str == "add") {
        _this.editorVisible = true;
        _this.content = $('#addDetail').html();
        _this.commonObj = 'addDetail';
        _this.$store.commit('EDITORPICTURE_VALUE', _this.addForm.riskCode);
      }
      else {
        if (_this.EditStatus) {
          _this.editorVisible = false;
        }
        else {
          _this.editorVisible = true;
        }
        _this.content = $('#editDetail').html();
        _this.commonObj = 'editDetail';
        _this.$store.commit('EDITORPICTURE_VALUE', _this.editForm.riskCode);
      }

    },
    //statement   ISstatement: false,commonObj ISnotice: false,
    statement: function (temp, index, obj) {
      let _this = this;
      _this.editorVisible = true;
      if (_this.ISstatement) {
        _this.content = $('#' + obj).html();
      }
      else {
        _this.content = _this.PlanForm.tbSpPlans[index].statement;
      }
      _this.commonID = obj;
      _this.commonObj = 'statement';
      _this.$store.commit('EDITORPICTURE_VALUE', _this.editorpictureRiskcode);
    },

    //statement
    notice: function (temp, index, obj) {
      let _this = this;
      _this.editorVisible = true;
      if (_this.ISnotice) {
        _this.content = $('#' + obj).html();
      }
      else {
        _this.content = _this.PlanForm.tbSpPlans[index].notice;
      }
      _this.commonID = obj;
      _this.commonObj = 'notice';
      _this.$store.commit('EDITORPICTURE_VALUE', _this.editorpictureRiskcode);
    },
    Preview: function (temp, index, obj) {
      let _this = this;
      _this.editorVisible = true;
      if (_this.ISpreview) {
        _this.content = $('#' + obj).html();
      }
      else {
        _this.content = _this.PlanForm.tbSpPlans[index].Preview;
      }
      _this.commonID = obj;
      _this.commonObj = 'Preview';
    },
    editorSubmit: function () {
      let _this = this;
      if (_this.commonObj == "statement") {
        $('#' + _this.commonID).html(_this.content);
        _this.ISstatement = true;
        _this.PlanForm.tbSpPlans[_this.commonIndex].statement = _this.content;
      }
      else if (_this.commonObj == "Preview") {
        $('#' + _this.commonID).html(_this.content);
        _this.ISpreview = true;
        _this.PlanForm.tbSpPlans[_this.commonIndex].clauseContent = _this.content;
      }
      else if (_this.commonObj == "addDetail") {
        $('#addDetail').html(_this.content);
        _this.addForm.detail = _this.content;
      }
      else if (_this.commonObj == "editDetail") {
        $('#editDetail').html(_this.content);
        _this.editForm.detail = _this.content;
      }
      else {
        $('#' + _this.commonID).html(_this.content);
        _this.ISnotice = true;
        _this.PlanForm.tbSpPlans[_this.commonIndex].notice = _this.content;
      }
      _this.editorVisible = false;
    },
    //审批详情
    handleExamine(index, row) {
      this.examineForm = {};
      var data = JSON.parse(row.content);
      this.examinedetailFormVisible = true;
      this.examineForm = JSON.parse(row.content);
      this.examineForm.userId = row.userId;
      this.examineForm.applyUser = row.applyUser;
      this.examineForm.remark = row.remark;
      this.examineForm.riskCode = commons.CodeName(this.clist, data.riskCode, "RiskCode");
      this.examineForm.status = commons.articleStatus(data.status);
      // this.examineForm.type = commons.articleType(data.type);
      this.examineForm.types = row.status == "0" ? "待审批" : (row.status == "1" ? "通过" : "不通过");
      this.examineForm.isShow = data.isShow == "1" ? "是" : "否";
      this.examineForm.startDate = commons.getDaytime(data.startDate, 2, false);
      this.examineForm.endDate = commons.getDaytime(data.endDate, 2, false);
      this.examineForm.approveTime = row.approveTime;
      this.examineForm.applyTime = row.applyTime;
      this.examinedata = data.productConfigs;
    },
    //设置计划
    handlePlan: function (index, row) {
      let _this = this;
      var tempdata = [];
      _this.editorpictureRiskcode = row.riskCode;
      _this.fileList = [];
      _this.Isclasslevel = JSON.parse(row.element).occupation;
      _this.PlanFormVisible = true;
      _this.PlanForm.tbSpPlans = [{
        planId: '',
        planName: '',
        serialNo: '',
        maxAge: '',
        minAge: '',
        maxDeadLine: '',
        limitTerm: '',
        minDeadLine: '',
        ageRelated: '0',
        isImmediate: '0',
        status: '1',
        remark: '',
        statement: '',
        notice: '',
        clauseUrl: '',
        clauseContent: '',
        classlevel: {
          classlevelMax: '',
          classlevelMin: '',
          alertMsg: '',
          showPrice: "",
          defaultAge: '',
          // queId:'',
          //   uploadId:'',
          minInsure: '',
          inputConfigId: '',
          isShowEnt: '',
          mainInsureVal: '',
          occupationLimit: ''
        }
      }];
      _this.PlanForm.id = row.id;
      let para = new FormData();
      para.append('productId', row.id);
      planList(para).then((res) => {
        tempdata = res.data.result;
        if (tempdata.length > 0) {
          _this.PlanForm.tbSpPlans = tempdata;
          var clUrl = [];
          for (var i in tempdata) {
            if (i == _this.commonIndex) {
              setTimeout(function () {
                $('#statement' + _this.commonIndex).html(tempdata[i].statement);
                $('#notice' + _this.commonIndex).html(tempdata[i].notice);
              }, 100);
            }
            _this.fileList.push([]);
            if (tempdata[i].clauseUrl) {
              clUrl = tempdata[i].clauseUrl.split(",");
              for (var k in clUrl) {
                _this.fileList[i].push({
                  name: commons.interceptName(clUrl[k]),
                  url: clUrl[k]
                });
              }
            }
            _this.PlanForm.tbSpPlans[i].classlevel = { classlevelMax: '', classlevelMin: '', alertMsg: '', defaultAge: '', minInsure: '', isShowEnt: '', isShowEnt: '', mainInsureVal: '', occupationLimit: '', inputConfigId: '', showPrice: "" };

            if (_this.PlanForm.tbSpPlans[i].limitTerm != null && _this.PlanForm.tbSpPlans[i].limitTerm != "") {
              let element = JSON.parse(_this.PlanForm.tbSpPlans[i].limitTerm);
              _this.PlanForm.tbSpPlans[i].classlevel.classlevelMax = element.classlevelMax;
              _this.PlanForm.tbSpPlans[i].classlevel.classlevelMin = element.classlevelMin;
              // _this.PlanForm.tbSpPlans[i].classlevel.alertMsg = element.alertMsg;
              // _this.PlanForm.tbSpPlans[i].classlevel.defaultAge = element.defaultAge;
              // _this.PlanForm.tbSpPlans[i].classlevel.queId = element.queId;
              // _this.PlanForm.tbSpPlans[i].classlevel.uploadId = element.uploadId;

              if (typeof (element.minInsure) == undefined) {
                _this.PlanForm.tbSpPlans[i].classlevel.alertMsg = '';
                _this.PlanForm.tbSpPlans[i].classlevel.showPrice = '';
                _this.PlanForm.tbSpPlans[i].classlevel.defaultAge = '';
                _this.PlanForm.tbSpPlans[i].classlevel.minInsure = '';
                _this.PlanForm.tbSpPlans[i].classlevel.isShowEnt = '';
                _this.PlanForm.tbSpPlans[i].classlevel.mainInsureVal = '';
                _this.PlanForm.tbSpPlans[i].classlevel.occupationLimit = '';
                _this.PlanForm.tbSpPlans[i].classlevel.inputConfigId = '';
              } else {
                _this.PlanForm.tbSpPlans[i].classlevel.showPrice = element.showPrice;
                _this.PlanForm.tbSpPlans[i].classlevel.alertMsg = element.alertMsg;
                _this.PlanForm.tbSpPlans[i].classlevel.defaultAge = element.defaultAge;
                _this.PlanForm.tbSpPlans[i].classlevel.minInsure = element.minInsure;
                _this.PlanForm.tbSpPlans[i].classlevel.isShowEnt = element.isShowEnt;
                _this.PlanForm.tbSpPlans[i].classlevel.mainInsureVal = element.mainInsureVal;
                _this.PlanForm.tbSpPlans[i].classlevel.inputConfigId = element.inputConfigId;
                _this.PlanForm.tbSpPlans[i].classlevel.occupationLimit = element.occupationLimit;
              }
            }
          }
        }
      });


    },
    plantitle: function (index) {
      var number;
      number = parseInt(index) + 1;
      return '计划' + number;
    },
    planName: function (index) {
      return index;
    },
    //删除
    handleDel: function (index, row) {
      this.$confirm('确认失效该记录吗?', '提示', {
        type: 'warning'
      }).then(() => {
        this.listLoading = true;
        let para = new FormData();
        para.append("ids", row.id);
        removeProduct(para).then((res) => {
          this.listLoading = false;
          //NProgress.done();
          this.$message({
            message: '失效成功',
            type: 'success'
          });
          this.getProducts(true);
        });
      }).catch(() => {
        this.listLoading = false;
      });
    },
    //恢复
    handleRecover: function (index, row) {
      this.$confirm('确认恢复该记录吗?', '提示', {
        type: 'warning'
      }).then(() => {
        this.listLoading = true;
        let para = new FormData();
        para.append("ids", row.id);
        rebackProduct(para).then((res) => {
          this.listLoading = false;
          //NProgress.done();
          this.$message({
            message: '恢复成功',
            type: 'success'
          });
          this.getProducts(true);
        });
      }).catch(() => {
        this.listLoading = false;
      });
    },
    //table导出excel
    exportExcels: function () {
      this.getProducts(false);
    },
    export2Excel: function () {
      require.ensure([], () => {
        const { export_json_to_excel } = require('../../vendor/Export2Excel');
        const tHeader = ['ID', '产品中文名', '产品英文名', '险种', '有效起期', '有效止期', '最大年龄', '最小年龄', '销量', '原价', '折扣价', '最低价格'];
        const filterVal = ['id', 'productCname', 'productEname', 'riskCode', 'startDate', 'endDate', 'maxAge', 'minAge', 'quantity', 'priPrice', 'discountPrice', 'minPrice'];
        const list = this.lists;
        for (var i in list) {
          list[i].riskCode = commons.CodeName(this.clist, list[i].riskCode, "RiskCode");
        }
        const data = this.formatJson(filterVal, list);
        export_json_to_excel(tHeader, data, '产品列表excel');
      })
    },
    formatJson: function (filterVal, jsonData) {
      return jsonData.map(v => filterVal.map(j => v[j]))
    },

    //显示修改界面
    handleEdit: function (index, row) {
      console.log(row)
      let _this = this;
      _this.filters.riskCodes = _this.clist;
      _this.addForm.riskCodes = _this.clist;
      _this.editForm.riskCodes = _this.clist;
      _this.addForm.productCompanys = _this.pClist;
      _this.editForm.productCompanys = _this.pClist;
      _this.filters.productCompanys = _this.clist;
      _this.approveRemark = '';
      _this.allIs = false;
      _this.$nextTick(function () {
        _this.showLicenseno = false;
      });
      _this.approveId = row.id;
      // $('#editDetail').html('');
      // _this.editForm = {
      //   id: '',
      //   productCname: '',
      //   productEname: '',
      //   productType: '',
      //   serialNo: '',
      //   riskCode: '',
      //   isShow: '',
      //   element: '',
      //   quantity: '',
      //   priPrice: '',
      //   discountPrice: '',
      //   minPrice: '',
      //   introduceUrl: '',
      //   schemeUrl: '',
      //   imgUrl: '',
      //   remark: '',
      //   detailUrl: '',
      //   imgThumbnailUrl: '',
      //   descrition: '',
      //   riskPrintName: '',
      //   detail: '',
      //   isExclusive: '',
      //   status: '',
      //   deadLine: '',
      //   maxAge: '',
      //   minAge: '',
      //   maxDeadLine: '',
      //   minDeadLine: '',
      //   minMonth:'',
      //   startDate: '',
      //   endDate: '',
      //   showOther: '1',
      //   advanceDay: '',
      //   riskCodes: '',
      //   isAxtx: false,
      //   isQuota: '1',
      //   baseStatus: '1',
      //   showEle: {
      //     "moreInsured": false,
      //     "isShowOther": false,
      //     "occupation": false,
      //     "locationHouse": false,
      //     "address": false,
      //     "houseType": false,
      //     "destination": false,
      //     "abroadDestination": false,
      //     "limitLicenseno": false,
      //     "vinno": false,
      //     "licenseno": false,
      //     'sameInsure': false,
      //     'queId':'',
      //       'uploadId':'',
      //     'minInsure':'',
      //     'inputConfigId':'',
      // 'isAxtx': false,
      //     'isShowEnt':true,
      //     'mainInsureVal':false,
      //     'occupationLimit':false
      //   }
      // };
      _this.IsValidate = _this.IsValidate.map(item => { return false });
      // _this.editForm = Object.assign({}, row);
      // function EAinitial(obj) {
      //   _this.editFormVisible = true;
      //   _this.IntegralAllotDatas = obj.productConfigs;
      //   for (var i in obj.productConfigs) {
      //     _this.IntegralAllotDatas[i].id = obj.productConfigs[i].id ? obj.productConfigs[i].id : '';
      //     _this.IntegralAllotDatas[i].productId = obj.productConfigs[i].productId ? obj.productConfigs[i].productId : '';
      //     _this.IntegralAllotDatas[i].status = obj.productConfigs[i].status;
      //     _this.IntegralAllotDatas[i].rate = obj.productConfigs[i].rate;
      //   }
      //   _this.editForm.id = obj.id;
      //   _this.editForm.productCname = obj.productCname;
      //   _this.editForm.productEname = obj.productEname;
      //   _this.editForm.productType = obj.productType;
      //   _this.editForm.riskCode = obj.riskCode;
      //   _this.editForm.quantity = obj.quantity;
      //   _this.editForm.priPrice = obj.priPrice;
      //   _this.editForm.riskPrintName = obj.riskPrintName;
      //   _this.editForm.discountPrice = obj.discountPrice;
      //   _this.editForm.minPrice = obj.minPrice;
      //   _this.editForm.remark = obj.remark;
      //   _this.editForm.descrition = obj.descrition;
      //   _this.editForm.detail = obj.detail;
      //   _this.editForm.advanceDay = obj.advanceDay;
      //   _this.editForm.maxAge = obj.maxAge;
      //   _this.editForm.minAge = obj.minAge;
      //   _this.editForm.minMonth = obj.minMonth;
      //   _this.editForm.isExclusive = obj.isExclusive;
      //   _this.editForm.maxDeadLine = obj.maxDeadLine;
      //   _this.editForm.minDeadLine = obj.minDeadLine;
      //   _this.editForm.startDate = obj.startDate;
      //   _this.editForm.endDate = obj.endDate;
      //   _this.editForm.status = obj.status;
      //   _this.editForm.baseStatus = obj.baseStatus;
      //   _this.editForm.isQuota = obj.isQuota ? obj.isQuota : '0';
      //   _this.editForm.isShow = obj.isShow;
      //   // _this.editForm.isAxtx = obj.isAxtx ? obj.isAxtx : false;
      //   _this.allIs = obj.isAxtx ? obj.isAxtx : false;

      //   _this.editForm.serialNo = obj.serialNo.toString();
      //   let element = JSON.parse(obj.element);
      //   console.log(element)
      //   _this.editForm.showEle.moreInsured = element.moreInsured;
      //   _this.editForm.showEle.isShowOther = element.isShowOther;
      //   _this.editForm.showEle.occupation = element.occupation;
      //   console.log(_this.editForm.showEle.isShowOther);
      //   _this.editForm.showEle.locationHouse = element.locationHouse;
      //   _this.editForm.showEle.address = element.address;
      //   _this.editForm.showEle.houseType = element.houseType;
      //   _this.editForm.showEle.destination = element.destination;
      //   _this.editForm.showEle.abroadDestination = element.abroadDestination;
      //   _this.editForm.showEle.isAxtx = element.isAxtx;
      //   _this.editForm.showEle.queId = element.queId;
      //   _this.editForm.showEle.uploadId = element.uploadId;
      //   _this.editForm.showEle.minInsure = element.minInsure;
      //   _this.editForm.showEle.inputConfigId = element.inputConfigId;
      //   _this.editForm.showEle.isShowEnt = element.isShowEnt;
      //   _this.editForm.showEle.mainInsureVal = element.mainInsureVal;
      //   _this.editForm.showEle.occupationLimit = element.occupationLimit;

      //   if (typeof (element.sameInsure) == 'undefinde') {
      //     _this.editForm.showEle.sameInsure = false;
      //   } else {
      //     _this.editForm.showEle.sameInsure = element.sameInsure;
      //   }
      //   _this.showOther = element.isShowOther;
      //   _this.$nextTick(function () {
      //     _this.showLicenseno = element.limitLicenseno;
      //   });

      //   _this.fileList2IntroduceUrl = [];
      //   _this.fileList2SchemeUrl = [];
      //   _this.fileList2ImgUrl = [];
      //   _this.fileList2DetailUrl = [];
      //   _this.fileList2ImgThumbnailUrl = [];

      //   if (!element.limitLicenseno) {
      //     _this.editForm.showEle.limitLicenseno = false;
      //     _this.editForm.showEle.vinno = false;
      //     _this.editForm.showEle.licenseno = false;
      //     _this.$nextTick(function () {
      //       _this.showLicenseno = false;
      //     });

      //   }
      //   else {
      //     _this.editForm.showEle.limitLicenseno = element.limitLicenseno;
      //     _this.editForm.showEle.vinno = element.vinno;
      //     _this.editForm.showEle.licenseno = element.licenseno;
      //   }
      //   var URL1;
      //   if (obj.schemeUrl) {
      //     URL1 = obj.introduceUrl.split(",");
      //     if (URL1.length > 0 && URL1[0] != "") {
      //       for (var i in URL1) {
      //         _this.fileList2IntroduceUrl.push({
      //           name: commons.interceptName(URL1[i]),
      //           url: URL1[i]
      //         });
      //       }
      //     }
      //     else {
      //       _this.fileList2IntroduceUrl = [];
      //     }
      //     _this.editForm.introduceUrl = URL1.join(',');
      //   }

      //   if (obj.schemeUrl) {
      //     URL1 = obj.schemeUrl.split(",")
      //     if (URL1.length > 0 && URL1[0] != "") {
      //       for (var i in URL1) {
      //         _this.fileList2SchemeUrl.push({
      //           name: commons.interceptName(URL1[i]),
      //           url: URL1[i]
      //         });
      //       }
      //     }
      //     else {
      //       _this.fileList2SchemeUrl = [];
      //     }

      //     _this.editForm.schemeUrl = URL1.join(',');
      //   }

      //   if (obj.imgUrl) {
      //     URL1 = obj.imgUrl.split(",")
      //     if (URL1.length > 0 && URL1[0] != "") {
      //       for (var i in URL1) {
      //         _this.fileList2ImgUrl.push({
      //           name: commons.interceptName(URL1[i]),
      //           url: URL1[i]
      //         });
      //       }
      //     }
      //     else {
      //       _this.fileList2ImgUrl = [];
      //     }
      //     _this.editForm.imgUrl = URL1.join(',');
      //   }
      //   if (obj.detailUrl) {
      //     URL1 = obj.detailUrl.split(",")
      //     if (URL1.length > 0 && URL1[0] != "") {
      //       for (var i in URL1) {
      //         _this.fileList2DetailUrl.push({
      //           name: commons.interceptName(URL1[i]),
      //           url: URL1[i]
      //         });
      //       }
      //     }
      //     else {
      //       _this.fileList2DetailUrl = [];
      //     }
      //     _this.editForm.detailUrl = URL1.join(',');
      //   }
      //   if (obj.imgThumbnailUrl) {
      //     URL1 = obj.imgThumbnailUrl.split(",")

      //     if (URL1.length > 0 && URL1[0] != "") {
      //       for (var i in URL1) {
      //         _this.fileList2ImgThumbnailUrl.push({
      //           name: commons.interceptName(URL1[i]),
      //           url: URL1[i]
      //         });
      //       }
      //     }
      //     else {
      //       _this.fileList2ImgThumbnailUrl = [];
      //     }
      //     _this.editForm.imgThumbnailUrl = URL1.join(',');
      //   }
      // };
      if (row.tbSpApprove) {
        var data = JSON.parse(row.tbSpApprove.content);
        _this.Atitle = "审批";
        _this.cancel = "不同意";
        _this.submit = "同意";
        _this.originalStatus = row.tbSpApprove.originalStatus;
        _this.EditStatus = true;
        _this.approveData = data;
        this.$nextTick(function () {
          $('#editDetail').html(data.detail);
        });
        // $("#editDetail").html(data.detail);
        this.EAinitial(data);
      }
      else {
        _this.Atitle = "修改";
        _this.cancel = "取消";
        _this.submit = "提交";
        _this.EditStatus = false;
        _this.approveData = null;
        this.$nextTick(function () {
          $('#editDetail').html(row.detail);
        });
        // $('#editDetail').html(row.detail);
        this.EAinitial(row);
        this.AllFalse(this.editForm.showEle.isAxtx, 'edit');
      }
      _this.editData = row;

    },
    EAinitial: function (obj) {
      this.editFormVisible = true;
      this.IntegralAllotDatas = obj.productConfigs;
      for (var i in obj.productConfigs) {
        this.IntegralAllotDatas[i].id = obj.productConfigs[i].id ? obj.productConfigs[i].id : '';
        this.IntegralAllotDatas[i].productId = obj.productConfigs[i].productId ? obj.productConfigs[i].productId : '';
        this.IntegralAllotDatas[i].status = obj.productConfigs[i].status;
        this.IntegralAllotDatas[i].rate = obj.productConfigs[i].rate;
      }
      this.editForm.id = obj.id;
      this.editForm.productCname = obj.productCname;
      this.editForm.productEname = obj.productEname;
      this.editForm.productType = obj.productType;
      this.editForm.riskCode = obj.riskCode;
      this.editForm.quantity = obj.quantity;
      this.editForm.priPrice = obj.priPrice;
      this.editForm.riskPrintName = obj.riskPrintName;
      this.editForm.discountPrice = obj.discountPrice;
      this.editForm.minPrice = obj.minPrice;
      this.editForm.remark = obj.remark;
      this.editForm.descrition = obj.descrition;
      this.editForm.detail = obj.detail;
      this.editForm.advanceDay = obj.advanceDay;
      this.editForm.maxAge = obj.maxAge;
      this.editForm.minAge = obj.minAge;
      this.editForm.minMonth = obj.minMonth;
      this.editForm.isExclusive = obj.isExclusive;
      this.editForm.maxDeadLine = obj.maxDeadLine;
      this.editForm.minDeadLine = obj.minDeadLine;
      this.editForm.startDate = obj.startDate;
      this.editForm.endDate = obj.endDate;
      this.editForm.status = obj.status;
      this.editForm.baseStatus = obj.baseStatus;
      this.editForm.isQuota = obj.isQuota ? obj.isQuota : '0';
      this.editForm.isShow = obj.isShow;
      this.editForm.isHot = obj.isHot;
      // _this.editForm.isAxtx = obj.isAxtx ? obj.isAxtx : false;
      this.allIs = obj.isAxtx ? obj.isAxtx : false;

      this.editForm.productCompany = obj.productCompany;

      this.editForm.serialNo = obj.serialNo.toString();
      let element = JSON.parse(obj.element);
      console.log(element)
      this.editForm.showEle.moreInsured = element.moreInsured;
      this.editForm.showEle.isShowOther = element.isShowOther;
      this.editForm.showEle.occupation = element.occupation;
      console.log(this.editForm.showEle.isShowOther);
      this.editForm.showEle.locationHouse = element.locationHouse;
      this.editForm.showEle.address = element.address;
      this.editForm.showEle.houseType = element.houseType;
      this.editForm.showEle.destination = element.destination;
      this.editForm.showEle.abroadDestination = element.abroadDestination;
      this.editForm.showEle.isAxtx = element.isAxtx;
      this.editForm.showEle.queId = element.queId;
      this.editForm.showEle.uploadId = element.uploadId;
      this.editForm.showEle.minInsure = element.minInsure;
      this.editForm.showEle.inputConfigId = element.inputConfigId;
      this.editForm.showEle.isShowEnt = element.isShowEnt;
      this.editForm.showEle.mainInsureVal = element.mainInsureVal;
      this.editForm.showEle.occupationLimit = element.occupationLimit;

      if (typeof (element.sameInsure) == 'undefinde') {
        this.editForm.showEle.sameInsure = false;
      } else {
        this.editForm.showEle.sameInsure = element.sameInsure;
      }
      this.showOther = element.isShowOther;
      this.$nextTick(function () {
        this.showLicenseno = element.limitLicenseno;
      });

      this.fileList2IntroduceUrl = [];
      this.fileList2SchemeUrl = [];
      this.fileList2ImgUrl = [];
      this.fileList2DetailUrl = [];
      this.fileList2ImgThumbnailUrl = [];

      if (!element.limitLicenseno) {
        this.editForm.showEle.limitLicenseno = false;
        this.editForm.showEle.vinno = false;
        this.editForm.showEle.licenseno = false;
        this.$nextTick(function () {
          this.showLicenseno = false;
        });

      }
      else {
        this.editForm.showEle.limitLicenseno = element.limitLicenseno;
        this.editForm.showEle.vinno = element.vinno;
        this.editForm.showEle.licenseno = element.licenseno;
      }
      var URL1;
      if (obj.schemeUrl) {
        URL1 = obj.introduceUrl.split(",");
        if (URL1.length > 0 && URL1[0] != "") {
          for (var i in URL1) {
            this.fileList2IntroduceUrl.push({
              name: commons.interceptName(URL1[i]),
              url: URL1[i]
            });
          }
        }
        else {
          this.fileList2IntroduceUrl = [];
        }
        this.editForm.introduceUrl = URL1.join(',');
      }

      if (obj.schemeUrl) {
        URL1 = obj.schemeUrl.split(",")
        if (URL1.length > 0 && URL1[0] != "") {
          for (var i in URL1) {
            this.fileList2SchemeUrl.push({
              name: commons.interceptName(URL1[i]),
              url: URL1[i]
            });
          }
        }
        else {
          this.fileList2SchemeUrl = [];
        }

        this.editForm.schemeUrl = URL1.join(',');
      }

      if (obj.imgUrl) {
        URL1 = obj.imgUrl.split(",")
        if (URL1.length > 0 && URL1[0] != "") {
          for (var i in URL1) {
            this.fileList2ImgUrl.push({
              name: commons.interceptName(URL1[i]),
              url: URL1[i]
            });
          }
        }
        else {
          this.fileList2ImgUrl = [];
        }
        this.editForm.imgUrl = URL1.join(',');
      }
      if (obj.detailUrl) {
        URL1 = obj.detailUrl.split(",")
        if (URL1.length > 0 && URL1[0] != "") {
          for (var i in URL1) {
            this.fileList2DetailUrl.push({
              name: commons.interceptName(URL1[i]),
              url: URL1[i]
            });
          }
        }
        else {
          this.fileList2DetailUrl = [];
        }
        this.editForm.detailUrl = URL1.join(',');
      }
      if (obj.imgThumbnailUrl) {
        URL1 = obj.imgThumbnailUrl.split(",")

        if (URL1.length > 0 && URL1[0] != "") {
          for (var i in URL1) {
            this.fileList2ImgThumbnailUrl.push({
              name: commons.interceptName(URL1[i]),
              url: URL1[i]
            });
          }
        }
        else {
          this.fileList2ImgThumbnailUrl = [];
        }
        this.editForm.imgThumbnailUrl = URL1.join(',');
      }
    },
    tableStyle: function (str, index) {
      let _this = this;
      var style = {
        // 'width':'100%',
        // 'height':'100%',
        // 'background-color':'red',
        // 'opacity':'0.5'
        'border-width': '1px',
        'border-style': 'solid',
        'border-color': '#FF6600',
        'border-radius': '4px'
      };
      if (_this.approveData && _this.approveData != null) {
        if (_this.approveData.productConfigs[index][str] != _this.editData.productConfigs[index][str]) {
          if (_this.approveData.productConfigs[index][str] != "" && _this.editData.productConfigs[index][str] != null) {
            return style;
          }
        }
      }
    },
    highlight: function (str) {
      let _this = this;
      var tempdata;
      var style = {
        'border-width': '1px',
        'border-style': 'solid',
        'border-color': '#FF6600',
        'border-radius': '4px'
      };
      if (_this.approveData && _this.approveData != null) {
        if (str == "startDate" || str == "endDate") {
          tempdata = commons.getDaytime(_this.approveData[str], 2, false);
        }
        else {
          tempdata = _this.approveData[str];
        }
        if (tempdata != _this.editData[str]) {
          if (_this.approveData[str] != "" && _this.editData[str] != null) {
            if (str == 'status') {
              if (_this.originalStatus != _this.approveData[str]) {
                return style;
              }
            }
            else {
              return style;
            }
          }
        }
      }
    },
    //加载车牌列表
    manageLicensenolist: function () {
      let para = new FormData();
      para.append("pageSize", this.manageLicensenopageSize);
      para.append("pageNumber", this.manageLicensenopage);
      this.manageLicensenoLoading = true;
      plateList(para).then((res) => {
        this.manageLicensenodata = res.data.result.content;
        this.manageLicensenototal = res.data.result.totalElements;
        this.manageLicensenoLoading = false;
      }).catch(() => {
        this.manageLicensenoLoading = false;
      });
    },
    //显示管理车牌
    manageLicenseno: function (bool) {
      this.manageLicensenoVisible = true;
      this.manageLicensenolist();
    },
    //添加车牌
    Onlicenseno: function () {
      if (this.Addlicenseno == "" || this.Addlicenseno == null) {
        this.$message({
          message: '请输入车牌号再添加!',
          type: 'error'
        });
      }
      else if (this.Addlicenseno.length != 2) {
        this.$message({
          message: '请输入车牌号前两位!',
          type: 'error'
        });
      }
      else {
        let para = new FormData();
        para.append('plateNo', this.Addlicenseno);
        addPlate(para).then((res) => {
          if (res.data.success) {
            this.$message({
              message: '添加成功',
              type: 'success'
            });
            this.Addlicenseno = "";
            this.manageLicensenolist();
          }
          else {
            this.$message({
              message: res.data.result,
              type: 'error'
            });
          }
        });
      }
    },
    //删除车牌
    manageLicensenoDel: function (index, row) {
      let para = new FormData();
      para.append('plateNo', row.code);
      removePlate(para).then((res) => {
        if (res.data.success) {
          this.$message({
            message: '删除成功',
            type: 'success'
          });
          this.manageLicensenolist();
        }
        else {
          this.$message({
            message: res.data.result,
            type: 'error'
          });
        }
      });
    },
    //显示新增界面
    handleAdd: function () {

      this.addFormVisible = true;
      // this.$refs['addForm'].resetFields();
      this.addForm = {};
      this.fileList1IntroduceUrl = [];
      this.fileList1SchemeUrl = [];
      this.fileList1ImgUrl = [];
      this.fileList1DetailUrl = [];
      this.fileList1ImgThumbnailUrl = [];
      this.manageLicensenodata = [];
      this.showOther = false;
      this.$nextTick(function () {
        this.showLicenseno = false;
      });
      this.IsValidate = this.IsValidate.map(item => { return false });
      // this.showLicenseno = false;

      $('#addDetail').html('');
      this.allIs = false;
      for (var i in this.IntegralAllotData) {
        this.IntegralAllotData[i].status = "0";
        this.IntegralAllotData[i].rate = 0;
      }
      this.addForm = {
        // id: '',
        productCname: '',
        productEname: '',
        productType: '',
        serialNo: '',
        riskCode: '',
        element: '',
        isShow: '1',
        quantity: '',
        priPrice: '',
        discountPrice: '',
        minPrice: '',
        introduceUrl: '',
        schemeUrl: '',
        imgUrl: '',
        status: '',
        remark: '',
        detailUrl: '',
        imgThumbnailUrl: '',
        descrition: '',
        riskPrintName: '',
        maxAge: '',
        isExclusive: '0',
        isAxtx: false,
        minAge: '',
        maxDeadLine: '',
        minDeadLine: '',
        ageRelated: '',
        showOther: '0',
        advanceDay: '',
        startDate: '',
        endDate: '',
        riskCodes: '',
        isQuota: '1',
        baseStatus: '1',
        productConfigs: {},
        showEle: {
          moreInsured: false,
          isShowOther: false,
          occupation: false,
          locationHouse: false,
          address: false,
          houseType: false,
          destination: false,
          abroadDestination: false,
          limitLicenseno: false,
          vinno: false,
          licenseno: false,
          sameInsure: false,
          queId: '',
          uploadId: '',
          minInsure: '',
          inputConfigId: '',
          isAxtx: false,
          isShowEnt: true,
          mainInsureVal: false,
          occupationLimit: false
        }
      };
    },
    //双击编辑
    addDblclick(row, column, cell, event) {
      if (column.label == '比例(可双击修改)') {
        this.inputCode = row.branchCode;
        this.InputStatus = true;
        this.$nextTick(function () {
          $(event.target).children().find("input").focus();
        })
      }
      else {
        this.InputStatus = false;
      }
    },
    //是否显示比例input
    Isinput: function (code, bool, status) {
      return this.inputCode == code && bool ? (status ? true : false) : (status ? false : true);
    },
    //input失去焦点
    inputblur: function (value) {
      this.InputStatus = false;
      this.helptext(value);
    },
    helpValidate: function (value, index) {
      if (!( /^-?\d+(\.\d{1,6})?$/.test(value)) || value > 1) {
        this.IsValidate[index] = true;
        return true;
      }
      else {
        this.IsValidate[index] = false;
        return false;
      }
    },
    helptext: function (value) {
      if (value == null || value == " " && !value == '0' || value.length == 0) {
        return '比例不能为空';
      }
      else if (!(/^-?\d+(\.\d{1,6})?$/.test(value))) {
        return '小数不能超过6位';
      }
      else if (value > 1) {
        return '比例不能大于1';
      }
      else {
        return '';
      }
    },
    //修改
    editSubmit: function () {
      console.log(this.editForm.showEle.isShowOther);
      this.$refs.editForm.validate((valid) => {
        if (valid) {
          if (this.IsValidate.find(d => d == true)) {
            this.$message({
              message: '积分比例配置格式不正确!',
              type: 'warning'
            });
          }
          else {
            this.$confirm('确认提交吗？', '提示', {}).then(() => {
              this.editLoading = true;

              if (this.EditStatus) {
                let para = new FormData();
                para.append('type', 'yes');
                para.append('id', this.approveId);
                para.append('remark', this.approveRemark);
                para.append('approveType', '1');
                approve(para).then((res) => {
                  if (res.data.success) {
                    this.$message({
                      message: '审批成功',
                      type: 'success'
                    });
                    this.editLoading = false;
                    this.$refs['editForm'].resetFields();
                    this.editFormVisible = false;
                    this.getProducts(true);
                    this.sels = [];
                  }
                  else {
                    this.editLoading = false;
                    this.$message({
                      message: res.data.result,
                      type: 'error'
                    });
                    this.editFormVisible = false;
                  }
                });
              }
              else {
                if (this.editForm.status == '1' && JSON.stringify(this.IntegralAllotDatas).indexOf('"status":"1"') < 0) {
                  this.$message({
                    message: "请先配置通用政策！",
                    type: 'error'
                  });
                } else {
                  this.editForm.element = JSON.stringify(this.editForm.showEle);
                  this.editForm.modifyTime = Date.parse(new Date());
                  this.editForm.productConfigs = this.IntegralAllotDatas;
                  let para = Object.assign({}, this.editForm);
                  para.startDate = (!para.startDate || para.startDate == '') ? '' : util.formatDate.format(new Date(para.startDate), 'yyyy-MM-dd');
                  para.endDate = (!para.endDate || para.endDate == '') ? '' : util.formatDate.format(new Date(para.endDate), 'yyyy-MM-dd');
                  console.log('para');
                  console.log(para);
                  editProduct(para).then((res) => {
                    if (res.data.success) {
                      this.editLoading = false;
                      this.$message({
                        message: '提交成功',
                        type: 'success'
                      });
                      this.$refs['editForm'].resetFields();
                      this.editFormVisible = false;
                      this.page = 1;
                      this.getProducts(true);
                    } else {
                      this.$message({
                        message: res.data.result,
                        type: 'error'
                      });
                    }
                  });
                }
              }
            });
          }

        }
        else {
          this.$message({
            message: '请填写必填项',
            type: 'warning'
          });
        }
      });
    },
    editCancel: function () {
      if (this.EditStatus) {
        let para = new FormData();
        para.append('type', 'no');
        para.append('id', this.approveId);
        para.append('approveType', '1');
        approve(para).then((res) => {
          if (res.data.success) {
            this.$message({
              message: '提交成功',
              type: 'success'
            });
            this.$refs['editForm'].resetFields();
            this.editFormVisible = false;
            this.getProducts(true);
          }
          else {
            this.editLoading = false;
            this.$message({
              message: res.data.result,
              type: 'error'
            });
            this.editFormVisible = false;
          }
        });
      }
      else {
        this.editFormVisible = false;
      }
    },

    isImmediates: function (obj, sum) {
      if (obj.isImmediate == "1") {
        if (obj.maxDeadLine <= obj.minDeadLine) {
          this.$message({
            message: '计划' + (parseInt(sum) + parseInt(1)) + '的最大承包期限必须大于最小承包期限',
            type: 'error'
          });
        }
      }
    },
    //计划
    PlanSubmit: function () {
      debugger
      var temp = this.PlanForm.tbSpPlans.length;
      for (var i in this.PlanForm.tbSpPlans) {
        this.PlanForm.tbSpPlans[i].limitTerm = JSON.stringify(this.PlanForm.tbSpPlans[i].classlevel);
      }
      // this.$refs.PlanForm.validate((valid) => {
      this.$confirm('确认提交吗？', '提示', {}).then(() => {
        this.PlanLoading = true;
        //NProgress.start();

        let para = this.PlanForm;
        addPlans(para).then((res) => {
          this.PlanLoading = false;
          //NProgress.done();
          this.$message({
            message: '提交成功',
            type: 'success'
          });
          this.PlanFormVisible = false;
          this.getProducts(true);
        }).catch(() => {
          this.PlanLoading = false;
        });
      });
      // });
    },
    //新增
    addSubmit: function () {
      this.$refs.addForm.validate((valid) => {
        if (valid) {
          if (this.IsValidate.find(d => d == true)) {
            this.$message({
              message: '积分比例配置格式不正确!',
              type: 'warning'
            });
          }
          else {
            this.$confirm('确认提交吗？', '提示', {}).then(() => {
              if (this.addForm.status == '1' && JSON.stringify(this.IntegralAllotData).indexOf('"status":"1"') < 0) {
                this.$message({
                  message: "请先配置通用政策！",
                  type: 'error'
                });
              } else {
                this.addLoading = true;
                // this.addForm.showEle.licenseno = this.manageLicensenodata;
                this.addForm.element = JSON.stringify(this.addForm.showEle);
                this.addForm.productConfigs = this.IntegralAllotData;
                let para = Object.assign({}, this.addForm);
                para.startDate = (!para.startDate || para.startDate == '') ? '' : util.formatDate.format(new Date(para.startDate), 'yyyy-MM-dd');
                para.endDate = (!para.endDate || para.endDate == '') ? '' : util.formatDate.format(new Date(para.endDate), 'yyyy-MM-dd');
                addProduct(para).then((res) => {
                  if (res.data.success) {
                    this.$message({
                      message: '提交成功',
                      type: 'success'
                    });
                    this.$refs['addForm'].resetFields();
                    this.addFormVisible = false;
                    this.getProducts(true);
                    this.sels = [];
                  }
                  else {
                    this.$message({
                      message: res.data.result,
                      type: 'error'
                    });
                  }
                  this.addLoading = false;

                }).catch(() => {
                  this.addLoading = false;
                });
              }
            });
          }

        }
        else {
          this.$message({
            message: '请填写必填项',
            type: 'warning'
          });
        }
      });
    },
    selsChange: function (sels) {
      this.sels = sels;
    },
    exclusiveselsChange: function (sels) {
      this.exclusivesels = sels;
    },
    exclusiveAddselsChange: function (sels) {
      this.exclusiveAddsels = sels;
    },
    //批量删除
    batchRemove: function () {
      var ids = this.sels.map(item => item.id).toString();
      this.$confirm('确认删除选中记录吗？', '提示', {
        type: 'warning'
      }).then(() => {
        this.listLoading = true;
        //NProgress.start();
        // let para = { ids: ids };
        let para = new FormData();
        para.append("ids", ids);
        removeProduct(para).then((res) => {
          this.listLoading = false;
          //NProgress.done();
          this.$message({
            message: '删除成功',
            type: 'success'
          });
          this.getProducts(true);
        });
      }).catch(() => {

      });
    },
    //专属列表
    getUsers: function (str) {
      let para = new FormData();
      para.append("pageSize", str == 'yes' ? this.exclusivepageSize : this.exclusiveAddpageSize);
      para.append("pageNumber", str == 'yes' ? this.exclusivepage : this.exclusiveAddpage);
      para.append("productId", this.exclusiveproductId);
      para.append("userCode", str == 'yes' ? this.exclusiveinfmationfilters.userCode : this.exclusiveAddfilters.userCode);
      para.append("userName", str == 'yes' ? this.exclusiveinfmationfilters.userName : this.exclusiveAddfilters.userName);
      para.append("branchCode", str == 'yes' ? this.exclusiveinfmationfilters.branchCode : this.exclusiveAddfilters.branchCode);
      para.append("agrementNo", str == 'yes' ? this.exclusiveinfmationfilters.agrementNo : this.exclusiveAddfilters.agrementNo);
      para.append("isIn", str);
      this.exclusiveinfmationLoading = true;
      getExclusive(para).then((res) => {
        this.exclusiveinfmationLoading = false;
        // this.exclusiveinfmationdata  = res.data.result.content;
        // this.exclusivetotal = res.data.result.totalElements;
        if (res.data.success) {
          if (str == 'yes') {
            this.exclusiveinfmationdata = res.data.result.content;
            this.exclusivetotal = res.data.result.totalElements;
          }
          else {
            this.exclusiveAdddata = res.data.result.content;
            this.exclusiveAddtotal = res.data.result.totalElements;
          }
        }
        else {
          this.$message({
            message: res.data.result,
            type: 'error'
          });
        }
      }).catch(() => {
        this.exclusiveinfmationLoading = false;
        // this.$message({
        //         message: '数据异常',
        //         type: 'error'
        // });
      });

    },
    handleAddexclusive: function () {
      this.exclusiveAddsels = [];
      this.exclusiveAddVisible = true;
      this.getUsers('no');
    },
    //专属取消
    handleqx: function (index, row) {
      var codes = this.exclusivesels.map(item => item.userCode).toString();
      this.$confirm('确认取消选中记录吗?', '提示', {
        type: 'warning'
      }).then(() => {
        this.exclusiveinfmationLoading = true;
        let para = new FormData();
        para.append("productId", this.exclusiveproductId);
        para.append("codes", codes);
        para.append("isExclusive", "false");
        setExclusive(para).then((res) => {
          this.exclusiveinfmationLoading = false;
          if (res.data.success) {
            this.$message({
              message: '取消成功',
              type: 'success'
            });
            this.getUsers('yes');
            this.exclusivesels = [];
          }
          else {
            this.$message({
              message: res.data.result,
              type: 'error'
            });
          }
        });
      }).catch(() => {
        this.exclusiveinfmationLoading = false;
        // this.$message({
        //       message: '数据异常',
        //       type: 'error'
        // });
      });
    },
    //添加专属提交
    exclusiveAddSubmit: function () {
      var codes = this.exclusiveAddsels.map(item => item.userCode).toString();
      if (this.exclusiveAddsels.length <= 0) {
        this.$message({
          message: '请选择用户再添加',
          type: 'warning'
        });
      }
      else {
        this.$confirm('确定添加选中记录吗?', '提示', {
          type: 'warning'
        }).then(() => {
          this.exclusiveAddsLoading = true;

          let para = new FormData();
          para.append("productId", this.exclusiveproductId);
          para.append("codes", codes);
          para.append("isExclusive", "true");
          setExclusive(para).then((res) => {
            this.exclusiveAddsLoading = false;
            if (res.data.success) {
              this.$message({
                message: '添加成功',
                type: 'success'
              });
              this.exclusiveAddVisible = false;
              this.getUsers('yes');
            }
            else {
              this.$message({
                message: res.data.result,
                type: 'error'
              });
            }
          });
        }).catch(() => {
          this.exclusiveAddsLoading = false;
          // this.$message({
          //       message: '数据异常',
          //       type: 'error'
          // });
        });
      }

    },

    btnShow: function () {
      let thisData = JSON.parse(sessionStorage.getItem('152'));
      let _this = this;
      $.each(thisData, function (i, j) {
        if (thisData[i] == "productQuery") {
          _this.productQuery = true;
        }
        if (thisData[i] == "productAdd") {
          _this.productAdd = true;
        }
        if (thisData[i] == "productExport") {
          _this.productExport = true;
        }
        if (thisData[i] == "productUpdate") {
          _this.productUpdate = true;
        }
        if (thisData[i] == "productDetail") {
          _this.productDetail = true;
        }
        if (thisData[i] == "productApprove") {
          _this.productApprove = true;
        }
        if (thisData[i] == "productPlan") {
          _this.productPlan = true;
        }

      });
    }
  },
  mounted() {
    console.log(this.user)
    this.getProducts(true);
    this.btnShow();
    this.PlanFormVisible = true;
    this.PlanFormVisible = false;
    // var blistdata = this.blist.result;
    // if (blistdata.length > 0) {
    // for (var i in blistdata) {
    // this.IntegralAllotData.push({
    //   status: '0',
    // branchCode: blistdata[i].code,
    // branchName: blistdata[i].codeCname,
    //   branchCode: '0000',
    //   branchName: '恒华保险代理有限公司',
    //   rate: 0
    // });
    this.IsValidate.push(false);
    // }
    // }

    let para = new FormData();
    para.append('branchNo', '0000');
    treeNextBranchList(para).then((res) => {
      if (res.data.result && res.data.success == true) {
        var blistdata = res.data.result;
        // this.branchs = res.data.result;
        for (let i in res.data.result) {

          this.IntegralAllotData.push({
            status: '0',
            branchCode: res.data.result[i].branchNo,
            branchName: res.data.result[i].branchCname,
            rate: 0
          });
        }
      }
    });
    this.IntegralAllotDatas = this.IntegralAllotData;
    this.findProductCompanylist();
  }
}

</script>

<style scoped>
.kboder {
  border: 1px solid #bfcbd9;
  overflow-y: scroll;
  overflow-x: hidden;
  cursor: pointer;
  border-radius: 4px;
}
.ksboder {
  margin: 10px;
  word-wrap: break-word;
}
.otherWidth {
  width: 100%;
}
.help-block {
  color: #ff4949;
  font-size: 12px;
  display: block;
}
</style>